trezy / next-safe

https://trezy.gitbook.io/next-safe/
BSD 3-Clause "New" or "Revised" License
167 stars 20 forks source link

[BUG]: frameOptions: false not working #42

Closed johanhermansson closed 1 year ago

johanhermansson commented 2 years ago

Describe the bug

When I set frameOptions: false the library still return the X-Frame-Options header.

The PR https://github.com/trezy/next-safe/pull/38 solves this problem by checking if the right value param is false 😄 , but maybe we should check both the key and value param for false?

Steps To Reproduce

  1. Create new Next.js app
  2. Setup next-safe:
    nextSafe({
        frameOptions: false
    })
  3. Start app
  4. Still see X-Frame-Options header in response

Version

v3.x.x

Relevant log output

No response

Code of Conduct

dohomi commented 1 year ago

I can confirm this does not work

trezy commented 1 year ago

Fixed by #38