[How to] Cross domain GET/POST during develop

  • Hi

    Nothing found in the forum. I apologize if I repeat the post.

    If you have to send HTTP requests (GET / POST) during development (to send highscores for example) you will see that you can not, because the browser detects that localhost and the domain to which you send or request information (mydomain.com) are different domains.

    In order to make cross-domain requests installs Firefox and the extension Force CORS 1.3. Press Ctrl+/ to view the extensions toolbar and you'll see the text cors, if you click will turn red and capitalization: from that moment you may do requests POST / GET from localhost to your server and save a lot of time. <img src="smileys/smiley1.gif" border="0" align="middle" />

    Note 1: Use the extension at your own risk. Do not surf the internet with CORS enabled.

    Note 2: Sorry for my English.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the AJAX manual entry there's a full section about "Making AJAX requests cross-domain or in preview". It's possibly safer and less browser dependent than installing extensions.

  • Hi

    I've read the manual but that solution, I understand that compromises the security of the server.

    With the Firefox extension I can only compromise the security of my browser when specifically active (if you close Firefox is automatically disabled)

    Best regards

    Josua

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