jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.13k stars 269 forks source link

proxy.html masters with file:// protocol #209

Open sportmann opened 6 years ago

sportmann commented 6 years ago

We try to register masters within the proxy.html to allow to communicate within a local opened html file (file:///C:/temp/ZKF_2033054588-3.html) corresponding with our https server. But the request gets blocked. It only works if we add the master: '':''

Is it possible to register 'file:///' masters?

`<!DOCTYPE HTML>

`
sportmann commented 6 years ago

Looks like if file is loading from local harddisk (file:///...) the origin is "null" and will be put to a "*". See screenshot. How han i recognize the html is loaded from a file? 2018-02-09_0852