Open binaryYuki opened 4 months ago
I'd like to offer an example we use previously.
error-pages:
image: akkk1234/error-pages:latest
environment:
SHOW_DETAILS: "true"
TEMPLATE_NAME: "connection"
labels:
- "traefik.enable=true"
- "traefik.http.routers.error-pages-router.rule=HostRegexp(`.+`)"
- "traefik.http.routers.error-pages-router.priority=10"
- "traefik.http.routers.error-pages-router.entrypoints=web"
- "traefik.http.routers.error-pages-router.middlewares=error-pages-middleware"
- "traefik.http.middlewares.error-pages-middleware.errors.status=400-599"
- "traefik.http.middlewares.error-pages-middleware.errors.service=error-pages_error-pages"
- "traefik.http.middlewares.error-pages-middleware.errors.query=/{status}.html"
- "traefik.http.services.error-pages-service.loadbalancer.server.port=8080"
networks:
- traefik-net
It is really useful when something went wrong.
This is a good idea to implement rate limiting, retries, and error pages, let's add this to the roadmap, for now it will be low priority for me, if someone wants to work on this that would be awesome!
@binaryYuki that example cover when a service are down they inmediately shows the error page?
@binaryYuki that example cover when a service are down they inmediately shows the error page?
Hello. Yes you are right. That is a go service defined as a traefik middleware that will show error pages while the service return an error code. You can also see https://github.com/tarampampam/error-pages for further docs.
Looking forward for this feature!
A simple middleware to define a basic auth on domains will be very useful
What problem will this feature address?
I propose an enhancement to the UI to include comprehensive management features for middleware configurations. This functionality will be particularly beneficial for managing and adding middleware, especially in clustered environments where fallback services like error-pages are critical.
Describe the solution you'd like
Key Features
Middleware Overview Page: A dedicated section in the UI to view all configured middleware. List all middleware with their current configuration.
Provide status indicators for active/inactive middleware. Add/Edit Middleware: Forms to easily add new middleware or edit existing ones. Support for different middleware types (e.g., error-pages, rate-limit, retry, etc.). Interactive fields for middleware parameters with validation.
Middleware Templates: Predefined templates for common middleware configurations. Quick start templates for frequently used middleware setups. Custom templates for reusable configurations.
Cluster-Wide Management: Tools to apply middleware configurations across multiple instances in a cluster. Synchronization options to ensure consistency. Conflict resolution mechanisms. Fallback Service Configuration: Enhanced support for configuring fallback services like error-pages.
UI support for linking services with middleware. Visualization of fallback service flow.
Benefits
Use Cases
Clustered Environments: Quickly deploy and manage middleware across multiple Traefik instances.
Error Handling: Efficiently set up and manage fallback services for error handling (e.g., custom error pages).
Performance Management: Easily configure and monitor performance-related middleware such as rate limiting and retries.
Describe alternatives you've considered
I think this could be done using internal apis like the traefik dashboard?
Additional context
No response