Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / SetHTTPHost

Author
Message
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 21st Nov 2017 14:04 Edited at: 21st Nov 2017 14:34
Quick question if I update my server by purchasing an SSL certificate and update my app so that SetHTTPHost is using a secure connection will older versions of the app still work if they are using SetHTTPHost(http, "server.url", 0)?

So the updated app will have SetHTTPHost(https, "server.url", 1)

And the old versions will have SetHTTPHost(http, "server.url", 0)

Is this going to break it for users of an old version?

Has anyone experienced this by adding a SSL certificate after an app was launched?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 21st Nov 2017 17:18 Edited at: 21st Nov 2017 17:21
http and https using different ports, normal they can run beside. with ms iis server you can choose if both are allowed.
anyhow at my web hosting provider its possible and my domain have access with http and https.
for other subdomains with https they will have extra money.
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.11.2) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 21st Nov 2017 17:19
I think this post has answered my question. It uses Google Maps API. I amended the secure value in the example and it worked. So it looks like you can run a secure connection and an unsecure connection to a server that has SSL.

https://forum.thegamecreators.com/thread/207320

If anyone can confirm that would be great as I don't want to suddenly stop a few hundred users from using the app.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 21st Nov 2017 17:20
Thanks Markus. I was writing my post when you wrote yours.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 21st Nov 2017 17:25
better say that you not want that http redirect to https if someone setup the certificate.
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.11.2) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 21st Nov 2017 17:36
I can probably do that in the .htaccess file but is that important? Not redirecting them? In the example below we don't actually tell it specifically to use https apart from the 0 and 1 value.

http = CreateHTTPConnection()
SetHTTPHost( http, "www.appgamekit.com", 0 )

Hopefully this set up will work?:

OLD VERSION OF THE APP
http = CreateHTTPConnection()
SetHTTPHost( http, "www.appgamekit.com", 0 )

NEW VERSION OF THE APP
http = CreateHTTPConnection()
SetHTTPHost( http, "www.appgamekit.com", 1 )

SERVER SETTINGS WITH SSL
Redirect http to https
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 21st Nov 2017 17:40
redirect means if you open this url in browser
http://www.appgamekit.com
it goto
https://www.appgamekit.com
but you said your old app should using the url without ssl and credentials.

AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.11.2) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 21st Nov 2017 18:42
The old app is using www.mydomain.com instead of http://www.mydomain.com.

I would like the url when accessed in a browser to redirect to https but if that causes problems with the old app I can probably live without it.
Dybing
12
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 21st Nov 2017 19:52
> Quick question if I update my server by purchasing an SSL certificate

No need to purchase a certificate. Use letsencrypt.org and get their certbot onto your server. It'll not only be free, but also update your certificate entirely automatically.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 21st Nov 2017 20:00
yes in agk commands its without http:// or https:// only controlled by secure flag.
but i guess if the web server redirect you at your browser to https your agk app will not connect just with http.
Quote: "I would like the url when accessed in a browser to redirect to https"

maybe you can do this self within a index.html
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.11.2) Radeon R7 265 : Mac mini OS High Sierra (10.13)

Login to post a reply

Server time is: 2024-04-18 03:31:49
Your offset time is: 2024-04-18 03:31:49