Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using an empty prefix (or /) in an http.listeners in the configuration crashes on startup #4068

Closed
sandhose opened this issue Feb 20, 2025 · 0 comments
Labels
O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Something isn't working

Comments

@sandhose
Copy link
Member

sandhose commented Feb 20, 2025

Since 0.14.0, the following configuration crashes the server on startup:

http:
  listeners:
    - name: "web"
      prefix: "/"
      resources:
        - name: discovery
        - name: human
        - name: oauth
        - name: assets
        - name: compat
        - name: graphql
        - name: adminapi
      binds:
        - address: "[::]:1234"
    - name: "internal"
      resources:
        - name: health
        - name: prometheus
      binds:
        - host: localhost
          port: 2345

with the following message:

thread 'main' panicked at crates/cli/src/server.rs:243:32:
Nesting at the root is no longer supported. Use merge instead.

The workaround is to remove the prefix property, or set it to null/~

http:
  listeners:
    - name: "web"

      # Comment it out
      #prefix: "/"

      # Set it to ~
      prefix: ~

      # Set it to null
      prefix: null
@sandhose sandhose added T-Defect Something isn't working O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant