Documentation
¶
Index ¶
- Constants
- func AssetHandler(next http.Handler) http.Handler
- func ServeAccessDeniedPage(w http.ResponseWriter, r *http.Request, code int, ...)
- func ServeErrorPage(w http.ResponseWriter, r *http.Request, code int, ...)
- func ServeHTTP(w http.ResponseWriter, r *http.Request, data any, statusCode ...int)
- type ErrorStatus
Constants ¶
View Source
const PathPrefix = "/__netbird__"
PathPrefix is the unique URL prefix for serving the proxy's own web assets. Using a distinctive prefix prevents collisions with backend application routes.
Variables ¶
This section is empty.
Functions ¶
func AssetHandler ¶
AssetHandler returns middleware that intercepts requests for the proxy's own web assets (under PathPrefix) and serves them from the embedded filesystem, preventing them from being forwarded to backend services.
func ServeAccessDeniedPage ¶
func ServeAccessDeniedPage(w http.ResponseWriter, r *http.Request, code int, title, message, requestID string)
ServeAccessDeniedPage renders a simple access denied page without the connection status graph.
func ServeErrorPage ¶
func ServeErrorPage(w http.ResponseWriter, r *http.Request, code int, title, message, requestID string, status ErrorStatus)
ServeErrorPage renders a user-friendly error page with the given details.
Types ¶
type ErrorStatus ¶
ErrorStatus represents the connection status for each component in the error page.
Click to show internal directories.
Click to hide internal directories.