waterlink/rack-reverse-proxy

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

royzinn opened this issue · 4 comments

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

@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".

@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

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