luraproject / lura

Ultra performant API Gateway with middlewares. A project hosted at The Linux Foundation
https://luraproject.org
Other
6.35k stars 563 forks source link

Apply httpsecure features (allowed hosts) to selected endpoints #407

Closed nvlan closed 3 years ago

nvlan commented 4 years ago

Is your feature request related to a problem? Please describe. We would like to limit the allowed hosts to a single sensitive endpoint, while allowing all other endpoints to be reached freely.

Describe the solution you'd like The possibility to add a krakend-httpsecure block inside the global configs of a single endpoint, instead of in the root level.

Describe alternatives you've considered Currently, I don't have in mind any alternative.

Additional context We are running krakend in Amazon ECS, and if we enable httpsecure, the healthcheck will always fail (the Host header is the IP address of the instance where the container is running).

nightmareze1 commented 4 years ago

+1

kpacha commented 4 years ago

try passing the host header and adding a CEL expression like this 'myHost' in req_headers['Host'] (https://www.krakend.io/docs/endpoints/common-expression-language-cel/)

github-actions[bot] commented 2 years ago

This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.