Skip to content
New issue

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

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

Already on GitHub? # to your account

Excluding an endpoint in API Gateway #496

Closed
SakalyaDeshpande opened this issue Aug 16, 2018 · 2 comments
Closed

Excluding an endpoint in API Gateway #496

SakalyaDeshpande opened this issue Aug 16, 2018 · 2 comments
Labels

Comments

@SakalyaDeshpande
Copy link

Is there any way to exclude an endpoint even it matches the regex of path mapping ?
e.g. I have a mapping

  • id: employees_api
    predicates:
    • Path=/mycompany/employees/**
      filters:
    • RewritePath=/mycompany/employees/(?.*), /mycompany/employees/${segment}
      uri: uri_of_api

I want to exclude only one endpoint and expose all other endpoints through gateway.

@spencergibb
Copy link
Member

spencergibb commented Nov 19, 2018

create a route for the one endpoint and use the SetStatus filter. Set the uri to no://op so that it won't get routed anywhere. Make sure this route comes before the others.

@rupeshkumar9312
Copy link

Suppose I have 2 endpoints one with Method = GET and other one in Method = POST and the path for both is same, for example /api/v1/users. How can I exclude the GET call from filter and add only POST call. Is there any way to do so ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants