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

HTTP headers support #4

Open
thomkrupa opened this issue Mar 5, 2019 · 3 comments
Open

HTTP headers support #4

thomkrupa opened this issue Mar 5, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@thomkrupa
Copy link
Member

gatsbyjs/gatsby#10890 (comment)

@thomkrupa thomkrupa added the enhancement New feature or request label Mar 5, 2019
@thomkrupa thomkrupa self-assigned this Mar 5, 2019
@thomkrupa thomkrupa added the help wanted Extra attention is needed label Aug 8, 2019
@lightningspirit
Copy link

I would like to suggest adding a new option in the plugin to flush all CSP header directives to a file in .cache directory which would allow other plugins to interact with.

For instance, gatsby-plugin-s3 would be able to pick it up and merge with their own params, which would then upload custom Metadata to S3 (then serve Content-Security-Policy as header).

Other plugins such as gatsby-plugin-netlify would be able to implement the same action.

Cross reference to gatsby-uc/gatsby-plugin-s3#144

@ryanerringtonatom
Copy link

@lightningspirit I agree, this feature would make server-side CSP implementation a lot easier.

Do you know of any alternate solutions/workarounds for a header-based approach?

@lightningspirit
Copy link

@lightningspirit I agree, this feature would make server-side CSP implementation a lot easier.

Do you know of any alternate solutions/workarounds for a header-based approach?

Actually, after a couple of tests, I ended up not using this plugin at all. Instead, I only used gatsby-uc/gatsby-plugin-s3#144 and decided to hardcode my Content-Security-Policy in plugin's configs for headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants