slackhq / csp-html-webpack-plugin

A plugin which, when combined with HTMLWebpackPlugin, adds CSP tags to the HTML output.
MIT License
164 stars 40 forks source link

CSP header not visible in network tab #49

Closed abadfish closed 4 years ago

abadfish commented 4 years ago

Description

I'm not sure if this is a bug or if my config is off but although I see the Content-Security-Policy meta tag generated in /build/index.html, I still don't see the header presenting in the response headers in the browser. I am using a Lambda for the other required headers but as is the purpose of this library, I can't whitelist my constantly changing chunk so I've decided to configure just CSP in a meta tag with this plug-in. I followed this article to implement it: https://medium.com/@nrshahri/csp-cra-324dd83fe5ff

Does anyone have any insight here as to why the header isn't visible? Can I not mix with Lambda?

What type of issue is this? (place an x in one of the [ ])

Requirements (place an x in each of the [ ])


Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

slackhq/csp-html-webpack-plugin version: 3.0.4

node version: 8.10.0

OS version(s): Ubuntu 18.04

Steps to reproduce:

1. 2. 3.

Expected result:

What you expected to happen

Actual result:

What actually happened

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

AnujRNair commented 4 years ago

This plugin only adds a meta tag to your html file - it doesn't have the ability to modify response headers in any way