I create test project. He work stable on my laptop. Send requests to my server. But when i upload this project to server on GDevelop game stopped sending requests to my server. What i should do, what game send requests to my server from GDevelop servers
Make sure you configured your server with the right CORS headers to allow the website your game is hosted on to access your server.
i allow all in\outbounds rule for test
You need to add all the rules in your .htaccess and some of the rules in PHP files assuming you’re using PHP, if not the the CORS rules for the programming language you’re using.
Add the headers according to your needs into the PHP.
Plus you can test your requests using
Some captures of my PHP files to process POST from GDevelop.
But i write server on Flask and api work without authorization
I allow all CORS rules for my server
Hi I’m not Flask expert but here is the docs for CORS
https://flask-cors.readthedocs.io/en/latest/
Im already added CORS to my server, but it doesn’t help me
Well sending requests to other servers is something that has been tested and definitely works, so the problem has to come from your server. If you want us to help you will have to share your server code.
API tester say 200
Sorry, check only now
And return what should
No problem
This server initialization
https://imgur.com/T0KNRWV
And this is method, what game used
https://imgur.com/oK9FFMP
I can’t see the code very well on the screenshot, and i will probably need to run it locally to debug the issue, would it be possible to post it on a github gist or paste in? (Replace your database secrets with dummy ones or with some sort of mock of course)
https://github.com/Freely-TEA/game_server
After install requirments also run pip install flask-cors
I dont update requir
Well I am not sure what the problem is because connecting to your server from a web build works fine for me:
Oh, i don’t understand. Okay. I will look for the problem
ahahahha
Guys, the problem was mixed content. GDevelop servers use https and my http and because of this the browser blocked the request
Thank you (for reminding me about the console). We won
But now i cant test rhis build on my laptop. He won’t connect (i correct http on https)