Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverse-proxy: T6370: Documented usage of http-response-headers option (backport #1463) #1465

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/configuration/loadbalancing/reverse-proxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@

Set SSL certeficate <name> for service <name>

.. cfgcmd:: set load-balancing reverse-proxy service <name>
http-response-headers <header-name> value <header-value>

Set custom HTTP headers to be included in all responses


Rules
^^^^^
Expand Down Expand Up @@ -154,8 +159,47 @@
Configure requests to the backend server to use SSL encryption without
validating server certificate

<<<<<<< HEAD
=======
.. cfgcmd:: set load-balancing reverse-proxy backend <name>
http-response-headers <header-name> value <header-value>

Set custom HTTP headers to be included in all responses using the backend


HTTP health check
^^^^^^^^^^^^^^^^^
For web application providing information about their state HTTP health
checks can be used to determine their availability.

.. cfgcmd:: set load-balancing reverse-proxy backend <name> http-check

Enables HTTP health checks using OPTION HTTP requests against '/' and
expecting a successful response code in the 200-399 range.

.. cfgcmd:: set load-balancing reverse-proxy backend <name> http-check
method <method>

Sets the HTTP method to be used, can be either: option, get, post, put

.. cfgcmd:: set load-balancing reverse-proxy backend <name> http-check
uri <path>

Sets the endpoint to be used for health checks

.. cfgcmd:: set load-balancing reverse-proxy backend <name> http-check
expect <condition>

Sets the expected result condition for considering a server healthy.
Some possible examples are:
* ``status 200`` Expecting a 200 response code
* ``status 200-399`` Expecting a non-failure response code
* ``string success`` Expecting the string `success` in the response body


>>>>>>> 3249752e (reverse-proxy: T6370: Documented usage of http-response-headers option)

Check warning on line 200 in docs/configuration/loadbalancing/reverse-proxy.rst

View workflow job for this annotation

GitHub Actions / lint

Line too long: len=89
Global
>>>>>>> 6703aeb4 (T6242: reverse-proxy: Document new backend option ssl no-verify)

Check warning on line 202 in docs/configuration/loadbalancing/reverse-proxy.rst

View workflow job for this annotation

GitHub Actions / lint

Line too long: len=82
-------

Global parameters
Expand Down Expand Up @@ -259,6 +303,7 @@

The ``https`` service listens on port 443 with backend `bk-default` to
handle HTTPS traffic. It uses certificate named ``cert`` for SSL termination.
HSTS header is set with a 1-year expiry, to tell browsers to always use SSL for site.

Check warning on line 306 in docs/configuration/loadbalancing/reverse-proxy.rst

View workflow job for this annotation

GitHub Actions / lint

Line too long: len=85

Rule 10 matches requests with the exact URL path ``/.well-known/xxx``
and redirects to location ``/certs/``.
Expand All @@ -281,6 +326,7 @@
set load-balancing reverse-proxy service https mode 'http'
set load-balancing reverse-proxy service https port '443'
set load-balancing reverse-proxy service https ssl certificate 'cert'
set load-balancing reverse-proxy service https http-response-headers Strict-Transport-Security value 'max-age=31536000'

set load-balancing reverse-proxy service https rule 10 url-path exact '/.well-known/xxx'
set load-balancing reverse-proxy service https rule 10 set redirect-location '/certs/'
Expand Down
Loading