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

fix: use HostListener for dragover to prevent CSP errors #134

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

Maece97
Copy link
Contributor

@Maece97 Maece97 commented Mar 6, 2025

With Angular's autoCSP configuration enabled, the current inline event listener for ondragover (event.preventDefault()) triggers a CSP violation.

This PR replaces the inline event listener with an @HostListener('dragover') decorator to ensure compliance with CSP restrictions while maintaining expected behavior.

Copy link
Owner

@hackingharold hackingharold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@hackingharold hackingharold merged commit d4c84b1 into hackingharold:main Mar 7, 2025
2 checks passed
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.

2 participants