Skip to content

docs: fix invalid server config examples (dashboard section, proxyAccessLog placement) - #561

Open
almeidapaulopt wants to merge 1 commit into
mainfrom
docs/fix-server-config-examples
Open

almeidapaulopt wants to merge 1 commit into
mainfrom
docs/fix-server-config-examples

Conversation

@almeidapaulopt

Copy link
Copy Markdown
Owner

What

Fixes the server-config YAML examples in three docs pages:

  • docs/content/docs/getting-started.md
  • docs/content/docs/v3/getting-started.md
  • docs/content/docs/v3/upgrading/from-v2.md

The examples showed a dashboard: server-config section and proxyAccessLog nested under log:. Neither exists in the server config:

  • adminAllowLocalhost and proxyAccessLog are top-level settings (internal/config/config.go, Data)
  • dashboard: is only valid inside preset templates (PresetDashboard)

With strict config loading, the old examples refuse to boot on v2.3.4 and silently drop the settings on v3/main.

Refs #559

Verification

Reproduced against the v2.3.4 strict loader (yaml KnownFields(true)), which users run today:

line 22: field dashboard not found in type config.config
line 28: field proxyAccessLog not found in type config.LogConfig

The fixed example loads on v2.3.4 with every documented setting applying (adminAllowLocalhost, proxyAccessLog, log.level, log.json, tailscale.dataDir, provider controlUrl).

On main, every tsdproxy.yaml fence in the three edited pages was extracted and loaded through unmarshalNormalized; all load and apply their settings.

Notes

A follow-up PR tightens the v3 loader: misplaced keys that are known elsewhere in the schema are currently silently dropped on main (v2.3.4 rejected them) — filed separately.

The getting-started examples (current and v3) showed a `dashboard:`
server-config section and `proxyAccessLog` nested under `log:`. Neither
exists in the server config: `adminAllowLocalhost` and `proxyAccessLog`
are top-level settings, and `dashboard:` is only valid inside preset
templates. With strict config loading these examples fail to boot (v2)
or silently drop the settings (v3).

Fixes the example in getting-started.md, v3/getting-started.md, and the
v3 from-v2 upgrade guide.

Refs #559

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.

1 participant