Skip to content

Conversation

tiennou
Copy link

@tiennou tiennou commented Feb 10, 2025

This adds the actual backend protocol to the options object we hack in, and replaces any occurrences of "http://" + host the client likes to do with the correct protocol.

Fixes loading map tiles through http even though the backend is server over https (making it rely on having an accessible http version, which might not exist).

To reproduce, open http://pandascreeps.localhost:8080/(https://server.pandascreeps.com/)/#!/map/shard0?pos=2.46,3.046 and http://pandascreeps.localhost:8080/(https://server.pandascreeps.com/)/#!/profile/Gadjung. Make sure you don't get redirected to the http version when logging in, I had that happen and it's confusing.

Before the patch, the first one can be observed loading map tiles through http://server.pandascreeps.com:21025/assets/map/W0S1.png?bust=1739218060553, which happens to work but isn't technically correct.

Note that I've checked the map and profile page, but that's about it. 🤞 I'm not catching something else in the middle of that batch-rewrite.

@admon84 admon84 changed the title fix problems with hardcoded http URLs fix: problems with hardcoded http URLs Feb 10, 2025
@admon84 admon84 merged commit 1747d20 into screepers:main Feb 10, 2025
3 of 4 checks passed
@tiennou tiennou deleted the fix-hardcoded-http-urls branch February 11, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants