Origin evil.com in Request Header

Web ServicesGoogle ChromeHeaderSame Origin-PolicyReferer

Web Services Problem Overview


I am trying to send form data to a webservice but below "Request Header" in the "Network" of the Chrome DOM I got the origin "evil.com" and referer "localhost:8080".

Accept:application/json, text/plain, */*
Accept-Encoding:gzip, deflate
Accept-Language:nb-NO,nb;q=0.8,no;q=0.6,nn;q=0.4,en-US;q=0.2,en;q=0.2
Connection:keep-alive
Content-Length:91
Content-Type:application/x-www-form-urlencoded; charset=UTF-8;
Host:office.insoft.net:9091
Origin:http://evil.com/
Referer:http://localhost:8080/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2230.0 Safari/537.36

I want to change to another origin and "localhost:8080" would be the best origin.

How do I resolve that problem?

Web Services Solutions


Solution 1 - Web Services

The overwrite of the header origin is caused by Allow-Control-Allow-Origin: * chrome extension.

Link to the extension

Try disabling this extension in order to solve your problem.

Solution 2 - Web Services

To create a jupyter_notebook_config.py file if it is not there, , you can use the following command line from ~/.jupyter:

$ jupyter notebook --generate-config

Uncomment this

c.NotebookApp.allow_origin = '*'

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionØystein DrabløsView Question on Stackoverflow
Solution 1 - Web ServicesJoffrey MaheoView Answer on Stackoverflow
Solution 2 - Web ServicesRAHUL KUMARView Answer on Stackoverflow