Bypass X-Frame-Options with Nginx
Bypass X-Frame-Options with Nginx The X-Frame-Options HTTP response header tells the browser whether a page can be displayed inside <frame>, <iframe>, <embed>, or <object>. Sites can prevent clickjacking by ensuring their pages are not embedded elsewhere. By using Nginx as a forward proxy, we can bypass X-Frame-Options and embed a third-party page in our own page.
X-Frame-Options has three possible values:
deny: the page cannot be displayed in a frame, even on the same origin. sameorigin: the page can be displayed in a frame on the same origin. allow-from uri: the page can be displayed in a frame only from the specified origin. When Chrome tries to load frame content and X-Frame-Options denies it, the console shows an error like: Refuse to display 'http://192.168.20.101:8080' in a frame because it set 'X-Frame-Options' to 'deny'.