Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalService redirect handler #83

Open
thinkmassive opened this issue Sep 26, 2022 · 0 comments
Open

LocalService redirect handler #83

thinkmassive opened this issue Sep 26, 2022 · 0 comments

Comments

@thinkmassive
Copy link
Contributor

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.

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

No branches or pull requests

1 participant