next-safe icon indicating copy to clipboard operation
next-safe copied to clipboard

Fixing makeHeaderObj checking wrong param for false

Open johanhermansson opened this issue 3 years ago • 2 comments

Value should be checked for false. This fixes frameOptions: false not working

johanhermansson avatar Feb 08 '22 18:02 johanhermansson

I need this change 😃

ivajo26 avatar Mar 31 '22 22:03 ivajo26

I need this change 😃

@ivajo26 You could bypass the problem by intermediate storing the nextSafe function results in a variable and filter out the X-Frame-Options from the array.

const headers = nextSafe();

module.exports = {
    async headers() {
        return [
            source: '/:path*',
            headers: headers.filter(({ key }) => key !== 'X-Frame-Options')
        ];
    }
};

johanhermansson avatar Apr 01 '22 08:04 johanhermansson

:tada: This PR is included in version 3.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Dec 04 '22 03:12 github-actions[bot]