Skip to content

Do not use CDN by default #1135

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

Open
studioromeo opened this issue Sep 20, 2024 · 3 comments
Open

Do not use CDN by default #1135

studioromeo opened this issue Sep 20, 2024 · 3 comments
Labels

Comments

@studioromeo
Copy link
Contributor

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x] Bug report -> please search issues before submitting
- [x] Feature request
- [ ] Documentation issue or request

While convenient to use a CDN I do not think this should be the default for the component. As the recent issue with polyfill.io showed reliance on a CDN that we do not control can represent a security risk so it should be up to users of the component to opt into the use of a CDN rather than opt out.

Here is the code. I believe we should change this to use a locally installed pdf.js worker copy by default and defer to CDN if a consumer requests this behaviour.
https://github.com/VadimDez/ng2-pdf-viewer/blob/2e15eea9b54f1f14e81f6f424b5c68d3ee54c0c2/src/app/pdf-viewer/pdf-viewer.component.ts#L247C11-L262

Appreciate this is quite a big change and would require a shift in usage of the component but keen to hear your thoughts.
Thanks

@shamoon
Copy link
Contributor

shamoon commented Sep 20, 2024

“Should” pretty much always implies not a bug report but in fact a feature/change request.

@studioromeo
Copy link
Contributor Author

Ah this is why I also ticked the feature request box 😄

Repository owner deleted a comment Oct 24, 2024
@64knl 64knl mentioned this issue Nov 5, 2024
Copy link

stale bot commented Apr 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants
@studioromeo @shamoon and others