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

Missing check for attribute assignments on config load #168

Closed
malud opened this issue Mar 29, 2021 · 0 comments · Fixed by #296
Closed

Missing check for attribute assignments on config load #168

malud opened this issue Mar 29, 2021 · 0 comments · Fixed by #296
Labels
bug Something isn't working
Milestone

Comments

@malud
Copy link
Collaborator

malud commented Mar 29, 2021

Describe the bug
Since there are a lot attributes which gets evaluated at runtime, there should be checked for assignment errors on start up to prevent confusion.

To Reproduce
Steps to reproduce the behavior:

  1. Which Couper version? Run couper version or docker run --entrypoint=/couper avenga/couper version
    master 2021-03-29 acfce46

  2. Provide your configuration file *.hcl. Remove sensitive data.

server "case" {
  endpoint "/**" {
    proxy {
      url = "https://httpbin.org/get/"
    }
    add_response_headers {
      x-data = "missing"
    }
  }
}
  1. Provide a curl call for reproduction
    curl -v http://localhost:8080/

Expected behavior
add_response_headers is an attribute and no block. Therefore Couper should not load the configuration and points to the related misconfigured line.

@malud malud added the bug Something isn't working label Mar 29, 2021
@malud malud added this to the 1.0 milestone Mar 29, 2021
@filex filex modified the milestones: 1.0, 1.x Mar 29, 2021
@alex-schneider alex-schneider linked a pull request Sep 2, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants