I have a button in my app that is supposed to open a link to the Rails app that seems to block access based on the request's referrer header.
When I use window.open('http://localhost/company?id=55', '_blank');
, I get a 404 Not Found error, but when I paste the same URL in the browser tab, it opens just find. This suggests to me that the Rails app discriminates connections based on where they come from.
Is it possible to replace that window.open
action with an XMLHttpRequest
(or anything else) that would open my URL in a new tab, and will pass to it custom referer header?