0

A web application i developed is sitting on a server that serves it under https, some of my js code requires to open a socket to another server (nodejs) who is currently not set for https. and thus browser wont allow it to run.

all i want is a simple way without getting involved with certificates just to initiate a https socket connection, i don't mind the lack of security, just need app to run.

Mike
  • 1,122
  • 2
  • 13
  • 25

1 Answers1

1

The certificates are not your problem. Your problem is CORS. You need to configure your server to answer with a header allows foreign-origin

res.header('Access-Control-Allow-Origin', 'example.com');

because in your case the technical difference between http (port 80) and https (443) is the port.

EDIT: ... I mean from the browsers point of view

Community
  • 1
  • 1
Danny
  • 1,078
  • 7
  • 22