nusmods
nusmods copied to clipboard
Timetable share URL is no longer shortened
Describe the bug
The URL should've been shortened to something like https://modsn.us/<somehash>
.
Cause
We have a short_url.php script which mediates requests to our modsn.us URL shortener service. This was previously supported by Nginx. However, as #1937 changes the reverse proxy to Traefik, we need to add back PHP support for this to work again.
Possible actions
- Rewrite the script to not use PHP (done: #3212)
- ~Add fastcgi support to our Traefik reverse proxy.~ No longer needed as we've migrated away from Docker (#3098)
- Because the script takes a while to load, we need to improve the shortening UX by changing the UI (for context, see #3212):
- Display the long URL while shortening happens
- Display shortened URL once it's available
- Allow toggling between original and shortened URLs so that 3rd party clients can use the URL without resolving the shortened URL. To be clear, parsing the share URL is not something we want to commit to supporting long-term, but let's just support it while it's convenient until we find a better way (e.g. with timetable sync: #796)
- Or implement any variation that makes sense
- Remove
enableShortUrl
feature flag once done.
Oh, it's a bug...
I actually liked it.
@angelsl I'm interested in why you like it. Could you explain a little why you prefer the long url?
@li-kai Sometimes I want to merge multiple timetables into one, etc; the long URL lets me do that easily.
Also saving the long URL gives me a bit more security since the information is there, versus the shortened URL where if the server dies my timetable would be lost.
I mean I could just resolve the shortened URL, but it's always one more step.