2018-11-23 17:14:15 +01:00
|
|
|
# ----------------------------------------------------------------------
|
2019-05-15 18:26:04 +02:00
|
|
|
# | Frame Options |
|
2018-11-23 17:14:15 +01:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
# Protect website against clickjacking.
|
|
|
|
#
|
2019-05-15 18:38:05 +02:00
|
|
|
# The example below sends the `X-Frame-Options` response header with the value
|
|
|
|
# `DENY`, informing browsers not to display the content of the web page in any
|
|
|
|
# frame.
|
2018-11-23 17:14:15 +01:00
|
|
|
#
|
2019-05-15 18:38:05 +02:00
|
|
|
# This might not be the best setting for everyone. You should read about the
|
|
|
|
# other two possible values the `X-Frame-Options` header field can have:
|
|
|
|
# `SAMEORIGIN` and `ALLOW-FROM`.
|
2018-11-23 17:14:15 +01:00
|
|
|
# https://tools.ietf.org/html/rfc7034#section-2.1.
|
|
|
|
#
|
2019-05-15 18:38:05 +02:00
|
|
|
# Keep in mind that while you could send the `X-Frame-Options` header for all
|
2020-02-05 17:52:58 +01:00
|
|
|
# of your website's pages, this has the potential downside that it forbids even
|
2021-06-13 23:30:25 +02:00
|
|
|
# non-malicious framing of your content.
|
2018-11-23 17:14:15 +01:00
|
|
|
#
|
2019-05-15 18:38:05 +02:00
|
|
|
# Nonetheless, you should ensure that you send the `X-Frame-Options` header for
|
|
|
|
# all pages that allow a user to make a state-changing operation (e.g: pages
|
|
|
|
# that contain one-click purchase links, checkout or bank-transfer confirmation
|
|
|
|
# pages, pages that make permanent configuration changes, etc.).
|
2018-11-23 17:14:15 +01:00
|
|
|
#
|
2019-05-15 18:38:05 +02:00
|
|
|
# Sending the `X-Frame-Options` header can also protect your website against
|
|
|
|
# more than just clickjacking attacks.
|
2018-11-23 17:14:15 +01:00
|
|
|
# https://cure53.de/xfo-clickjacking.pdf.
|
|
|
|
#
|
2021-06-13 23:30:25 +02:00
|
|
|
# (!) The `Content-Security-Policy` header has a `frame-ancestors` directive
|
|
|
|
# which obsoletes this header for supporting browsers.
|
|
|
|
#
|
2018-11-23 17:14:15 +01:00
|
|
|
# https://tools.ietf.org/html/rfc7034
|
2021-06-14 12:38:26 +02:00
|
|
|
# https://owasp.org/www-project-secure-headers/#x-frame-options
|
|
|
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
|
|
|
|
# https://docs.microsoft.com/archive/blogs/ieinternals/combating-clickjacking-with-x-frame-options
|
2018-11-23 17:14:15 +01:00
|
|
|
|
2019-02-10 20:46:58 +01:00
|
|
|
add_header X-Frame-Options $x_frame_options always;
|