Skip to content

Fix --api.require-localhost-auth flag name to match docs (#30) - #46

Open
jay23606 wants to merge 1 commit into
Alia5:mainfrom
jay23606:pr-go-simple/30
Open

jay23606 wants to merge 1 commit into
Alia5:mainfrom
jay23606:pr-go-simple/30

Conversation

@jay23606

Copy link
Copy Markdown

Kong derives the CLI flag from the Go field name, so the field RequireLocalHostAuth produced --api.require-local-host-auth, while the docs and the env var VIIPER_API_REQUIRE_LOCALHOST_AUTH use 'localhost'. Renamed the field to RequireLocalhostAuth in internal/server/api/config.go and updated its two usages (server.go, server_test.go). No behavior change.

Added internal/cmd/server_flags_test.go, a regression test that parses --api.require-localhost-auth=true through Kong and checks the field is set. It passes locally.

Not run locally: the internal/server/api test package, because it fails to build here (missing embedded 'bundle' directory in internal/install and module downloads were needed). CI should cover it.

🤖 Generated with Claude Code

Tests not run here: GOFLAGS=-mod=readonly go test ./internal/server/api/ -run Auth -count=1: package setup failed locally (internal/install embed pattern 'bundle' has no files, and modules needed downloading); left for CI

Fixes #30

🤖 Generated with Claude Code

@jay23606
jay23606 marked this pull request as ready for review November 19, 2026 19:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Commandline parameter for RequireLocalHostAuth doesn't match docs

1 participant