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

feat: allow disabling default redirect, set status to 503 #3845

Open
wants to merge 13 commits into
base: next
Choose a base branch
from

Conversation

KaelWD
Copy link

@KaelWD KaelWD commented Oct 10, 2024

Changes

  • Default status code is now 503 not 404. There is some discussion about it in Traefik always returns a 404 HTTP code even if no backend is currently configured traefik/traefik#8141 but I think 404 is a really bad default, 503 will actually display a "this server is down" page behind cloudflare for example.
  • Default config can now be removed so you can override it with something custom such as a pretty HTML page.
  • Refactored the setupDefaultRedirect method to only do things once, it was a bit hard to follow before.

Issues


  • Should I add a proxy->redirect_rewrite option too to display a custom page without changing the url?

static::retrieved(function ($server) {
if (!isset($server->proxy->redirect_enabled)) {
$server->proxy->redirect_enabled = true;
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better way to make sure this is true by default?

Copy link

gitguardian bot commented Oct 14, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@peaklabs-dev peaklabs-dev added the 🛠️ Feature Issues requesting a new feature. label Oct 14, 2024
@KaelWD KaelWD mentioned this pull request Nov 15, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ Feature Issues requesting a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants