Skip to content

Commit 719cd0e

Browse files
authored
Merge pull request #9 from ProjectLighthouseCAU/api-token-changes
Remove trusted proxy setting as it does not work with docker name resolution and we don't need it anyways
2 parents ead1066 + 8440f79 commit 719cd0e

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ var (
3131
ApiHost string = getString("API_HOST", "https://lighthouse.uni-kiel.de") // for CORS and Swagger UI API documentation
3232
ApiBasePath string = getString("API_BASE_PATH", "/api") // used only for Swagger UI
3333

34-
ProxyHeader string = getString("PROXY_HEADER", "X-Real-Ip") // "X-Real-Ip" behind a reverse proxy and "" for hosting without a proxy
35-
TrustedProxy string = getString("TRUSTED_PROXY", "traefik")
34+
ProxyHeader string = getString("PROXY_HEADER", "X-Real-Ip") // "X-Real-Ip" behind a reverse proxy and "" for hosting without a proxy
35+
3636
// Cross-Origin-Resource-Sharing
3737
CorsAllowOrigins string = getString("CORS_ALLOW_ORIGINS", ApiHost) // by default only allow the API host, add allowed origins by appending them separated with commas
3838
CorsAllowCredentials bool = getBool("CORS_ALLOW_CREDENTIALS", false)

setup/setup.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ func Setup() *fiber.App {
2828

2929
log.Println("Starting Heimdall")
3030
app := fiber.New(fiber.Config{
31-
AppName: "Heimdall",
32-
CaseSensitive: true,
33-
StrictRouting: true,
34-
ProxyHeader: config.ProxyHeader,
35-
EnableTrustedProxyCheck: true,
36-
TrustedProxies: []string{config.TrustedProxy},
31+
AppName: "Heimdall",
32+
CaseSensitive: true,
33+
StrictRouting: true,
34+
ProxyHeader: config.ProxyHeader,
3735
})
3836

3937
// Dependency Injection

0 commit comments

Comments
 (0)