sandstorm-io/sandcats

301 Redirect for Moved Servers

Opened this issue · 2 comments

Kinda a crazy idea/request, but I was thinking about this.

If my server is using Sandcats, and I want to move to my own domain at some point, it will break ALL of my Sandstorm sharing links out there. But all of the strings in those sharing links are still valid, they just are going to the wrong server address.

It'd be really neat if I could tell Sandcats that foo.sandcats.io has moved to foo.bar.com, and have Sandcats forward any requests for that subdomain to the new server location, maintaining the /shared and all from the original URL.

Hmm, for security I think you'd want those redirects to be served by your own server, since the URLs contain secrets and such. So maybe the answer is that the whole sandcats infrastructure stays running on your server (dynamic DNS, certificate generation), but is used just to serve these redirects to the machine's new hostname.

That seems sensible. I figured I should at least mention this idea here to ensure when/if Sandcats is rebuilt using Workers/LE, any opportunities to meet this wishlist item are factored in.

It's possible/likely this should be done in Sandstorm (and I know supporting multiple BASE_URLs is a wishlist item out there, but at least smart handling of requests for the previous one would be nice), though this repo may be the best place to collect Sandcats-related feature requests.