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

Reusable proxies #561

Merged
merged 20 commits into from
Aug 31, 2022
Merged

Reusable proxies #561

merged 20 commits into from
Aug 31, 2022

Conversation

alex-schneider
Copy link
Contributor

@alex-schneider alex-schneider commented Aug 22, 2022

Labeled proxy blocks defined in definitions can be referenced with the proxy attribute in an endpoint:

server {
  api {
    endpoint "/a" {
      beta_required_permission = "pr1"
      proxy = "p"
    }
    endpoint "/a" {
      beta_required_permission = "pr2"
      proxy = "p"
    }
    endpoint "/c" {
      beta_required_permission = "pr3"
      proxy = "p"
    }
  }
}
# ...
definitions {
  proxy "p" {
    backend = "b"
    # ...
  }
  backend "b" {
    # ...
  }
}

Reviewer checklist
  • Read PR description: a summary about the changes is required
  • Changelog updated
  • Documentation: docs/{Reference, Cli, ...}, Docker and cli help/usage
  • Pulled branch, manually tested
  • Verified requirements are met
  • Reviewed the code
  • Reviewed the related tests

config/configload/merge.go Outdated Show resolved Hide resolved
server/testdata/endpoints/18_couper.hcl Outdated Show resolved Hide resolved
config/configload/merge.go Show resolved Hide resolved
config/configload/merge.go Outdated Show resolved Hide resolved
Alex Schneider and others added 3 commits August 31, 2022 14:12
Co-authored-by: Johannes Koch <53434855+johakoch@users.noreply.github.com>
@johakoch johakoch merged commit 0adf7d3 into master Aug 31, 2022
@johakoch johakoch deleted the reusable-proxies branch August 31, 2022 12:39
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.

2 participants