proxy-host-object.json 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. {
  2. "type": "object",
  3. "description": "Proxy Host object",
  4. "required": [
  5. "id",
  6. "created_on",
  7. "modified_on",
  8. "owner_user_id",
  9. "domain_names",
  10. "forward_host",
  11. "forward_port",
  12. "access_list_id",
  13. "certificate_id",
  14. "ssl_forced",
  15. "caching_enabled",
  16. "block_exploits",
  17. "advanced_config",
  18. "meta",
  19. "allow_websocket_upgrade",
  20. "http2_support",
  21. "forward_scheme",
  22. "enabled",
  23. "locations",
  24. "hsts_enabled",
  25. "hsts_subdomains"
  26. ],
  27. "properties": {
  28. "id": {
  29. "$ref": "../common.json#/properties/id"
  30. },
  31. "created_on": {
  32. "$ref": "../common.json#/properties/created_on"
  33. },
  34. "modified_on": {
  35. "$ref": "../common.json#/properties/modified_on"
  36. },
  37. "owner_user_id": {
  38. "$ref": "../common.json#/properties/user_id"
  39. },
  40. "domain_names": {
  41. "$ref": "../common.json#/properties/domain_names"
  42. },
  43. "forward_host": {
  44. "type": "string",
  45. "minLength": 1,
  46. "maxLength": 255,
  47. "example": "127.0.0.1"
  48. },
  49. "forward_port": {
  50. "type": "integer",
  51. "minimum": 1,
  52. "maximum": 65535,
  53. "example": 8080
  54. },
  55. "access_list_id": {
  56. "$ref": "../common.json#/properties/access_list_id"
  57. },
  58. "certificate_id": {
  59. "$ref": "../common.json#/properties/certificate_id"
  60. },
  61. "ssl_forced": {
  62. "$ref": "../common.json#/properties/ssl_forced"
  63. },
  64. "caching_enabled": {
  65. "$ref": "../common.json#/properties/caching_enabled"
  66. },
  67. "block_exploits": {
  68. "$ref": "../common.json#/properties/block_exploits"
  69. },
  70. "advanced_config": {
  71. "type": "string",
  72. "example": ""
  73. },
  74. "meta": {
  75. "type": "object",
  76. "example": {
  77. "nginx_online": true,
  78. "nginx_err": null
  79. }
  80. },
  81. "allow_websocket_upgrade": {
  82. "description": "Allow Websocket Upgrade for all paths",
  83. "type": "boolean",
  84. "example": true
  85. },
  86. "http2_support": {
  87. "$ref": "../common.json#/properties/http2_support"
  88. },
  89. "forward_scheme": {
  90. "type": "string",
  91. "enum": ["http", "https"],
  92. "example": "http"
  93. },
  94. "enabled": {
  95. "$ref": "../common.json#/properties/enabled"
  96. },
  97. "locations": {
  98. "type": "array",
  99. "minItems": 0,
  100. "items": {
  101. "type": "object",
  102. "required": ["forward_scheme", "forward_host", "forward_port", "path"],
  103. "additionalProperties": false,
  104. "properties": {
  105. "id": {
  106. "type": ["integer", "null"]
  107. },
  108. "path": {
  109. "type": "string",
  110. "minLength": 1
  111. },
  112. "forward_scheme": {
  113. "$ref": "#/properties/forward_scheme"
  114. },
  115. "forward_host": {
  116. "$ref": "#/properties/forward_host"
  117. },
  118. "forward_port": {
  119. "$ref": "#/properties/forward_port"
  120. },
  121. "forward_path": {
  122. "type": "string"
  123. },
  124. "advanced_config": {
  125. "type": "string"
  126. }
  127. }
  128. },
  129. "example": [
  130. {
  131. "path": "/app",
  132. "forward_scheme": "http",
  133. "forward_host": "example.com",
  134. "forward_port": 80
  135. }
  136. ]
  137. },
  138. "hsts_enabled": {
  139. "$ref": "../common.json#/properties/hsts_enabled"
  140. },
  141. "hsts_subdomains": {
  142. "$ref": "../common.json#/properties/hsts_subdomains"
  143. },
  144. "certificate": {
  145. "oneOf": [
  146. {
  147. "type": "null",
  148. "example": null
  149. },
  150. {
  151. "$ref": "./certificate-object.json"
  152. }
  153. ],
  154. "example": null
  155. },
  156. "owner": {
  157. "$ref": "./user-object.json"
  158. },
  159. "access_list": {
  160. "oneOf": [
  161. {
  162. "type": "null",
  163. "example": null
  164. },
  165. {
  166. "$ref": "./access-list-object.json"
  167. }
  168. ],
  169. "example": null
  170. }
  171. }
  172. }