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

Do not use CDN by default #1135

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

Do not use CDN by default #1135

studioromeo opened this issue Sep 20, 2024 · 2 comments

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
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

No branches or pull requests

9 participants
@studioromeo @shamoon and others