Documentation
¶
Index ¶
- func Chain(h http.Handler, mw ...func(http.Handler) http.Handler) http.Handler
- func ListenAndServe(a *app.App) error
- func NewRouter(a *app.App) http.Handler
- func RealIP(next http.Handler) http.Handler
- func Recoverer(next http.Handler, logger *slog.Logger) http.Handler
- func RequireAdmin(next http.Handler) http.Handler
- func SessionAuth(db *sql.DB) func(http.Handler) http.Handler
- func UserFromContext(ctx context.Context) *auth.User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
func RealIP ¶
RealIP sets r.RemoteAddr to the client IP from X-Forwarded-For or X-Real-IP headers. Only enable behind a trusted reverse proxy.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.