Skip to content

Hardcoded main site in CSP #838

@akerl

Description

@akerl

Hi!

I was doing some checking on my web services and noticed that GoatCounter hardcodes the CSP for the main goatcounter CDN as part of the codebase: https://github.com/arp242/goatcounter/blob/main/handlers/mw.go#L347

That CSP makes sense when somebody is using the CDN, but given I'm self-hosting the count.js file, is that necessary? Also, for the count file itself, I'm wondering if it needs to serve up any CSP allowances at all given that it's self-contained?

Happy to try to put up a PR to adjust the behavior if the above makes sense.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions