httputil

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseURL

func GetBaseURL(r *http.Request, fallbackURL string) string

GetBaseURL extracts the base URL from request headers (for nginx proxy) or falls back to configured URL It checks headers in the following order: 1. X-Forwarded-Proto + X-Forwarded-Host (nginx proxy headers) 2. X-Forwarded-Host alone (assumes https) 3. Host header (with scheme based on TLS) 4. Falls back to the provided fallbackURL

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL