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

Fixing makeHeaderObj checking wrong param for false #38

Merged
merged 1 commit into from
Dec 4, 2022

Conversation

johanhermansson
Copy link
Contributor

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

Value should be checked for false. This fixes `frameOptions: false` not working
@ivajo26
Copy link

ivajo26 commented Mar 31, 2022

I need this change 😃

@johanhermansson
Copy link
Contributor Author

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')
        ];
    }
};

Copy link
Owner

@trezy trezy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Great catch!

@trezy trezy merged commit 4ffda6d into trezy:main Dec 4, 2022
@github-actions
Copy link

github-actions bot commented Dec 4, 2022

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants