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

fix: add explicit imports for setHeader and removeResponseHeader in 00-context.ts #374

Merged
merged 1 commit into from Feb 15, 2024

Conversation

stefffens
Copy link

@stefffens stefffens commented Feb 13, 2024

Fixes my issue #373

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

It seems like not explicitly importing setHeader (and i assume also removeResponseHeader)
prevents them from beeing in the output of the nuxt build.

It solved the issue that setting the headers via a nitro plugin with the hook 'nuxt-security:headers' does not work.

Resolves: #373

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)
    I have not added tests, since it is only a missing import

Copy link

vercel bot commented Feb 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuxt-security ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2024 1:11pm

@stefffens
Copy link
Author

Hello, thank you for approving this.
Do I have to do anything else? This is my first contribution ever. And I don't work with GitHub in usually.

@Baroshem
Copy link
Owner

Hey Buddy,

Sorry but I was quite busy recent days.

Thanks for the issue and a fix! I will merge it and release it as a second patch (1.1.2).

@Baroshem Baroshem merged commit 7931ae7 into Baroshem:main Feb 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not set Headers using {runtimeHooks:true}
3 participants