aperture icon indicating copy to clipboard operation
aperture copied to clipboard

LocalService redirect handler

Open thinkmassive opened this issue 3 years ago • 0 comments

When the proxy encounters an unknown route, it would be useful to have the option of responding with a redirect instead of a static site.

An example is when the proxied service has a main page/site hosted elsewhere, and it's undesirable to maintain a separate landing page for the proxy. For my use case I think only permanent (301) is needed, although maybe two versions could be useful:

  • servepermanentredirect: return 301, overrides servestatic
  • servetemporaryredirect: return 302, active when others are undefined (or static site missing?)

I don't have a specific case in mind for the temporary version, but it seems like it could be useful for maintenance. Or maybe a simple serveredirect would be plenty, and the code could be set another way if needed.

thinkmassive avatar Sep 26 '22 17:09 thinkmassive