I have my api running on node js, where for security reasons, I have set up a middle ware function check the origin header, if it is from my website, then only the api should go ahead. I am finding issues with Chrome Extension, as it does not pass the origin header in the get requests, also in the put requests, it sends something like chrome:// as the origin header. Can somebody help?
Regards, Manik Mittal
Well, that's how Chrome sets the Origin
for extensions. It's not simple to override.
It is, however, possible to override. You'll need to use the webRequest
API, specifically a blocking response to onBeforeSendHeaders
, to rewrite the origin to whatever you like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With