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

Need guide #2

Closed
ermiaqasemi opened this issue Jun 23, 2021 · 2 comments
Closed

Need guide #2

ermiaqasemi opened this issue Jun 23, 2021 · 2 comments

Comments

@ermiaqasemi
Copy link

Hey there,

How can I enable this just for a specific route?

`
route /api/gateway/* {
# Just wanna rate limit here
# I wanna allow user to send 100 req per min

    rewrite * /graphql
    reverse_proxy http://tribe-gateway.development.svc.cluster.local
}

`
Thanks!

@ermiaqasemi
Copy link
Author

I make it work but when adding rate limit to route it throws CORS issue I already tried this but not work,

header Access-Control-Allow-Origin "*" header Access-Control-Allow-Methods "GET, POST, OPTIONS" header Access-Control-Allow-Credentials true

@mholt
Copy link
Owner

mholt commented Jun 23, 2021

Seems you have figured it out... in that case I'll close the issue. If you have further questions (about CORS, or whatever else unrelated to rate limiting) please ask on the forums: https://caddy.community - thanks!

@mholt mholt closed this as completed Jun 23, 2021
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

No branches or pull requests

2 participants