Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add CSP-friendly Alpine build #3959

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Add CSP-friendly Alpine build #3959

merged 2 commits into from
Jan 4, 2024

Conversation

calebporzio
Copy link
Collaborator

This PR provides a version of AlpineJS that is compatible with strict content security policies that would otherwise prevent the usage of Alpine because of "unsafe-eval" violations.

It removes the ability to evaluate JavaScript expressions inside HTML attributes; however, it maintains ALL functionality of Alpine otherwise.

All plugins and features are CSP-compatible when using this build.

@calebporzio calebporzio merged commit 8c1511a into main Jan 4, 2024
@calebporzio calebporzio deleted the add-csp-build branch January 4, 2024 20:06
@loicy
Copy link

loicy commented Mar 28, 2024

Hi,

After test of 3.13.5 & 3.13.7, It seems that without the use of unsafe-eval is still mandatory.

@ekwoka
Copy link
Contributor

ekwoka commented Mar 29, 2024

@loicy using @alpinejs/csp ? Just to be clear.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants