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

No 'Access-Control-Allow-Origin' header is present on the requested resource #35

Open
royzinn opened this issue Sep 20, 2016 · 4 comments

Comments

@royzinn
Copy link

royzinn commented Sep 20, 2016

Hi,
Thanks for sharing this GEM.
I am trying to use the gem following this article https://medium.com/@parterburn/wordpress-inside-a-ruby-on-rails-app-c324fbf39ad8#.wjiweptf8 which is to setup a WP blog on '/blog' for Rails app.
Everything seems to be working fine except that the loaded page has access control issues: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I set the response header from WP to allow access control (it has Access-Control-Allow-Origin:* in the response header. but the page still seems to block some content.
Anything you can suggest that may resolve it?
Thanks

@nicobrenner
Copy link

@royzinn were you able to solve this? I'm having the same/similar problem. The wordpress site under /blog loads fine, but some fonts don't load. The browser gives the following error: "has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource".

@waterlink
Copy link
Owner

waterlink commented Feb 14, 2018 via email

@royzinn
Copy link
Author

royzinn commented Feb 15, 2018

@nicobrenner - sorry for the delayed response. I'm not sure what we did as we abandoned the WP option and went for something else. Look at the response above however, it might be helpful.

Roy

@nicobrenner
Copy link

@waterlink Thank you so much for the super quick and on point reply. Was able to solve it as you said, by adding CORS headers on the wordpress side. It was actually pretty simple with an .htaccess file, used this as a guide: https://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains

@royzinn Thank you for the info. What option did you guys go for in the end?

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