How do I request to HTTP server (without HTTPS) in C3 preview mode

Not favoritedFavorited Favorited 0 favourites
  • 6 posts
From the Asset Store
Create your own wss server and ws server with ssl and without ssl.
  • When I try to send a request to an http server, my request is rejected in the C3 preview mode.

    But when I export to HTML5, it worked fine. Only in preview mode will it be rejected.

    I have no way to make the target server to update to https, Because it's not my server.

    The current temporary solution is that I built a reverse proxy server locally to proxy this link to an https server, but this method is not very convenient.

    Tagged:

  • Modern browsers block secure websites from sending requests to insecure websites. So it's browsers that are blocking this for all web content, it's not specific to Construct. Construct's preview is a secure website, and so you will hit this security restriction in preview mode.

    The one exception is you can make insecure requests to localhost - that is allowed as the system knows the request will not leave the same device.

    All modern web content should be secure and run on HTTPS. Nobody should be running an insecure web server for anything important these days.

  • Modern browsers block secure websites from sending requests to insecure websites. So it's browsers that are blocking this for all web content, it's not specific to Construct. Construct's preview is a secure website, and so you will hit this security restriction in preview mode.

    The one exception is you can make insecure requests to localhost - that is allowed as the system knows the request will not leave the same device.

    All modern web content should be secure and run on HTTPS. Nobody should be running an insecure web server for anything important these days.

    Is there any way to make it work? Because this is a development test server provided by the other team, I can't make any changes to it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you only need it to work for your one browser, you can try going to chrome://flags and changing settings to allow it. It looks like you could add the specific server to "Insecure origins treated as secure" to minimise the security risk of allowing any insecure access.

  • Thank you very much! It worked!

    But another nightmare came immediately: "has been blocked by CORS"

    It seems like there's really nothing I can do about it. I had to give up :(

    Deploy an intermediate server to make them work, currently the only way.

  • That sounds like a regular cross-domain request issue, and that's also covered in the manual.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)