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

CORS policy: No 'Access-Control-Allow-Origin' #444

Closed
javid-abd opened this issue Feb 12, 2019 · 1 comment
Closed

CORS policy: No 'Access-Control-Allow-Origin' #444

javid-abd opened this issue Feb 12, 2019 · 1 comment

Comments

@javid-abd
Copy link

- [X ] Bug report -> please search issues before submitting

Access to fetch at 'https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf' from origin 'https://dashboard.finna.ai' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

(this is just a test remote URL)

I can't use any remote URL for pdf rendering. All of these point out this CORS problem. It used to work properly but it seems something as changed.

@angular/core 7.2.2
@angular/cli 7.2.3

@ColinT
Copy link
Contributor

ColinT commented Feb 13, 2019

It is unlikely that this behavior is a reversion since it is not supported by the underlying pdfjs viewer.
Please refer to the following documentation:
https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-xhr
mozilla/pdf.js#1000 (comment)

For development purposes you can use the cors-anywhere public demo server:
[src]="'https://cors-anywhere.herokuapp.com/https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf'"
stackblitz demo

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

3 participants