I have a script which uses websocket on loopback. Since website is served over the internet and websocket over intranet, I observe "SCRIPT12017: WebSocket Error: SECURITY_ERR, Cross zone connection not allowed" in Microsoft Edge. I observe similar problem in Internet explorer as well. IE and MS Edge categories URLs into different zones, each with unique privileges and hence does not allow cross zone connections.
Can I solve this by enabling CORS (Cross Origin Resource Sharing) or CORS works only for different origins from same zone. Or is there any other solution to this problem without altering any settings on the client device?