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(index): disabling one header disabled all headers #80

Merged
merged 1 commit into from
Jun 18, 2020
Merged

fix(index): disabling one header disabled all headers #80

merged 1 commit into from
Jun 18, 2020

Conversation

Asjas
Copy link
Contributor

@Asjas Asjas commented Jun 16, 2020

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

This fixes #79.

I replaced the return statement with a continue statement and the other security modules are no longer disabled when you pass { moduleName: false } to fastify-helmet.

I also added tests to check that the header is removed and that the default security headers are still there.

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@SerayaEryn SerayaEryn left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit b30e072 into fastify:master Jun 18, 2020
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.

Unwanted disabling of other security modules due to incorrect early return
4 participants