{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.krakend.io/schema/v2.2/router.json",
  "title": "Router Flags",
  "description": "The optional router configuration allows you to set global flags that change the way KrakenD processes the requests at the router layer.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
  "type": "object",
  "properties": {
    "app_engine": {
      "title": "App Engine integration",
      "description": "The app_engine boolean trusts headers starting with X-AppEngine... for better integration with that PaaS.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "boolean"
    },
    "auto_options": {
      "title": "Automatic OPTIONS",
      "description": "When true, enables the autogenerated OPTIONS endpoint for all the registered paths\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "boolean"
    },
    "disable_access_log": {
      "title": "Disable Access Log",
      "description": "Stops registering access requests to KrakenD and leaving any logs out from the output.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "default": false,
      "type": "boolean"
    },
    "disable_gzip": {
      "title": "Disable gzip compression",
      "description": "Enterprise only. All the output to the end user on the Enterprise Edition uses gzip when accepted by the client. Use this flag to remove gzip compression.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "default": false,
      "type": "boolean"
    },
    "disable_handle_method_not_allowed": {
      "title": "Disable method not allowed",
      "description": "Whether to checks if another method is allowed for the current route, if the current request can not be routed. If this is the case, the request is answered with Method Not Allowed and HTTP status code 405. If no other Method is allowed, the request is a 404.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "boolean"
    },
    "disable_health": {
      "title": "Disable Health",
      "description": "When true you don't have any exposed health endpoint. You can still use a TCP checker or build an endpoint yourself.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "default": false,
      "type": "boolean"
    },
    "disable_path_decoding": {
      "title": "Disable method not allowed",
      "description": "Disables automatic validation of the url params looking for url encoded ones.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "boolean"
    },
    "disable_redirect_fixed_path": {
      "title": "Disable redirect fixed path",
      "description": "If true, the router tries to fix the current request path, if no handle is registered for it\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "boolean"
    },
    "disable_redirect_trailing_slash": {
      "title": "Disable redirect trailing slash",
      "description": "Disables automatic redirection if the current route can't be matched but a handler for the path with (without) the trailing slash exists.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "boolean"
    },
    "error_body": {
      "title": "Custom error body",
      "description": "Sets custom error bodies for 404 and 405 errors.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "object",
      "properties": {
        "404": {
          "title": "404 errors",
          "description": "Write any JSON object structure you would like to return to users when they request an endpoint not known by KrakenD. 404 Not Found errors.",
          "type": "object"
        },
        "405": {
          "title": "405 errors",
          "description": "Write any JSON object structure you would like to return to users",
          "type": "object"
        }
      },
      "patternProperties": {
        "^[@$_#]": {}
      },
      "additionalProperties": false
    },
    "forwarded_by_client_ip": {
      "title": "Forwarded by client IP",
      "description": "When set to true, client IP will be parsed from the request's headers. If no IP can be fetched, it falls back to the IP obtained from the request's remote address.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "default": false,
      "type": "boolean"
    },
    "health_path": {
      "title": "Health endpoint path",
      "description": "The path where you'd like to expose the health endpoint.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "default": "/__health",
      "type": "string"
    },
    "hide_version_header": {
      "title": "Hide version header",
      "description": "Removes the version of KrakenD used in the X-KrakenD-version headers.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "default": false,
      "type": "boolean"
    },
    "logger_skip_paths": {
      "title": "Remove requests from logs",
      "description": "Defines the set of paths that are removed from the logging.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "array",
      "items": {
        "title": "Paths",
        "type": "string"
      }
    },
    "max_multipart_memory": {
      "title": "Memory available for Multipart forms",
      "description": "Sets the maxMemory param that is given to http.Request's Multipart Form method call.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "integer"
    },
    "remote_ip_headers": {
      "title": "Remote IP headers",
      "description": "List of headers used to obtain the client IP when `forwarded_by_client_ip` is set to `true` and the remote address is matched by at least one of the network origins of `trusted_proxies`.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "array"
    },
    "remove_extra_slash": {
      "title": "Remove extra slash",
      "description": "A parameter can be parsed from the URL even with extra slashes.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "default": false,
      "type": "boolean"
    },
    "return_error_msg": {
      "title": "Returning the gateway error message",
      "description": "When there is an error in the gateway (such as a timeout, a non-200 status code, etc.) it returns to the client the reason for the failure. The error is written in the body as is.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "default": false,
      "type": "boolean"
    },
    "trusted_proxies": {
      "title": "Trusted Proxies",
      "description": "List of network origins (IPv4 addresses, IPv4 CIDRs, IPv6 addresses or IPv6 CIDRs) from which to trust request's headers that contain alternative client IP when `forwarded_by_client_ip` is `true`.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/",
      "type": "array"
    }
  },
  "patternProperties": {
    "^[@$_#]": {}
  },
  "additionalProperties": false
}
