Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Targets is list of backend hosts used to proxy the request. // Backend hosts is selected by Round-Robin scheduling. // Required. Default: nil Targets []string // Methods is list of HTTP methods allowed for proxying. // Optional. Default: nil Methods []string // Filter defines a function to skip middleware. // Optional. Default: nil Filter func(*fiber.Ctx) bool // ErrorHandler is a function for handling unexpected errors. // Optional. Default: StatusServiceUnavailable ErrorHandler func(*fiber.Ctx, error) // Rules defines the URL path rewrite rules. The values captured in asterisk can be // retrieved by index e.g. $1, $2 and so on. // Optional. Default: nil // Example: // "/old": "/new", // "/api/*": "/$1", // "/js/*": "/public/javascripts/$1", // "/users/*/orders/*": "/user/$1/order/$2", Rules map[string]string // contains filtered or unexported fields }
Config holds configuration for the middleware
Click to show internal directories.
Click to hide internal directories.