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

Vendor Bulma CSS #43

Merged
merged 1 commit into from
Jun 6, 2023
Merged

Vendor Bulma CSS #43

merged 1 commit into from
Jun 6, 2023

Conversation

olivier-thatch
Copy link
Contributor

Vendor Bulma's minified CSS directly in the gem.

If the app importing Audits1984 uses a Content Security Policy, it won't be able to import the stylesheet from https://cdn.jsdelivr.net without explicitly allowing it in the policy. Bundling the stylesheet with the app is a simple way to fix this issue.

(Arguably it's also better practice from a security standpoint for an auditing tool to avoid making any requests to third parties.)

The minified CSS is still 202KiB large, so if you think that's too large to include as part of the gem, I can instead submit a PR to customize the CSP specifically for Audits1984's controller actions. It wouldn't be too difficult to implement, but it'd be less user-friendly as it should probably be an opt-in flag (since you probably don't want to start tweaking the CSP in apps that don't have a CSP in the first place).

cc @jorgemanrubia @dhh

@jorgemanrubia
Copy link
Member

I think vendoring the CSS makes sense @olivier-thatch, thank you

@jorgemanrubia jorgemanrubia merged commit 4b401a1 into basecamp:master Jun 6, 2023
@olivier-thatch olivier-thatch deleted the vendor-bulma branch June 6, 2023 16:13
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.

None yet

2 participants