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

Add __cspreport__ endpoint? #1075

Open
leplatrem opened this issue Feb 14, 2017 · 2 comments
Open

Add __cspreport__ endpoint? #1075

leplatrem opened this issue Feb 14, 2017 · 2 comments
Labels
documentation stale For marking issues as stale. Labeled issues will be closed soon if label is not removed.

Comments

@leplatrem
Copy link
Contributor

leplatrem commented Feb 14, 2017

Especially if the kinto-admin plugin is enabled?

@g-k
Copy link

g-k commented Feb 14, 2017

It might be useful in dev.

For stage and prod, we usually have nginx log to a file:

    location /__cspreport__ {
        access_log /media/ephemeral0/nginx/logs/CSP.log CSP;
        proxy_pass http://127.0.0.1/csp-proxy;
    }

    location /csp-proxy {
      access_log off;
      return 204;
      allow 127.0.0.1;
      deny all;
    }

or nginx w/ openresty:

    location = /__cspreport__ {
        access_log /media/ephemeral0/nginx/logs/CSP.log CSP;
        lua_need_request_body on;
        rewrite_by_lua 'ngx.exit(204)';
    }

@leplatrem
Copy link
Contributor Author

Thanks for your feedback!

According to what I read here, the POST data should be logged too no?

I guess it makes sense to have this endpoint in Kinto if the Content-Security-Policy header is set here too (to assure report-uri value consistency).

So at least we can document the nginx configuration in the production docs, so let's keep this issue opened :)

@alexcottner alexcottner added the stale For marking issues as stale. Labeled issues will be closed soon if label is not removed. label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation stale For marking issues as stale. Labeled issues will be closed soon if label is not removed.
Projects
None yet
Development

No branches or pull requests

3 participants