You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
forces the proxy to be called in http, non #https. We can replace http:// with // (protocol relative) but why change the relative url proxyUrl (that should be something like /mapstore/proxy/) with http(s)://currentdomain/mapstore/proxy ? It is the definition of domain relative path.
The only different behiviour happens when the proxyUrl is relative to the path (without the / on start) but in this case maybe it is wanted.
/mapstore/proxy => http://some.domain/mapstore/proxy (the same of keeping /mapstore/proxy)
This is allowed only if the domain has cors, otherwise it is forbidden by the browser. (keeping /mapstore/proxy will do the correct request to https://some.domain/mapstore/proxy )
mapstore/proxy => http://some.domainmapstore/proxy This is an error (keeping /mapstore/proxy will work in this case, and if the relative proxyUrl is a configuration error)
window.location : https://some.domain/app => window.host : some.domain /mapstore/proxy => http://some.domainmapstore/proxy This is allowed only if the domain has cors, otherwise it is forbidden by the browser.(keeping /mapstore/proxy will work in this case, and if the relative proxyUrl is a configuration error)
window.location : http://some.domain/app http://someother.domain/mapstore/proxy => http://some.domain/mapstore/proxy (the same of keeping /mapstore/proxy)
host: https://some.domain http://someother.domain/mapstore/proxy => http://some.domain/mapstore/proxy This is allowed only if the domain has cors, otherwise it is forbidden by the browser. (keeping /mapstore/proxy will do the correct request to https://some.domain/mapstore/proxy )
So in any case the check in the issue useless or even harmful. Can you find a use case when it is useful ?
Activity
mbarto commentedon May 25, 2016
We cannot remove this completely, we can change the rule to accept // starting urls as valid and not apply the replacement for those
offtherailz commentedon May 25, 2016
To clarify I report the various use cases:
ProxyURL: /mapstore/proxy (domain relative)
http://some.domain/app=> window.host :some.domain/mapstore/proxy=>http://some.domain/mapstore/proxy(the same of keeping/mapstore/proxy)https://some.domain/app=> window.host :https://some.domain/mapstore/proxy=>http://some.domain/mapstore/proxyThis is allowed only if the domain has cors, otherwise it is forbidden by the browser. (keeping
/mapstore/proxywill do the correct request tohttps://some.domain/mapstore/proxy)ProxyURL: mapstore/proxy (path relative)
http://some.domain/app=> window.host :some.domainmapstore/proxy=>http://some.domainmapstore/proxyThis is an error (keeping/mapstore/proxywill work in this case, and if the relative proxyUrl is a configuration error)https://some.domain/app=> window.host :some.domain/mapstore/proxy=>http://some.domainmapstore/proxyThis is allowed only if the domain has cors, otherwise it is forbidden by the browser.(keeping/mapstore/proxywill work in this case, and if the relative proxyUrl is a configuration error)ProxyURL:
http://someother.domain/mapstore/proxy(absolute)http://some.domain/apphttp://someother.domain/mapstore/proxy=>http://some.domain/mapstore/proxy(the same of keeping/mapstore/proxy)https://some.domainhttp://someother.domain/mapstore/proxy=>http://some.domain/mapstore/proxyThis is allowed only if the domain has cors, otherwise it is forbidden by the browser. (keeping/mapstore/proxywill do the correct request tohttps://some.domain/mapstore/proxy)So in any case the check in the issue useless or even harmful. Can you find a use case when it is useful ?
Fix geosolutions-it#613. Remove useful control on proxy url