-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
Forward headers for API routes? #608
Comments
EDIT: So after more invesitgation it turns out I was going down the wrong path. It looks like what is actually happening is the So the question now becomes, is this by design and is there any way to override this behaviour in the config? |
As you mentioned, I think you may need to forward EDIT: ah, sorry, misread that you already tried that. I think that
but if you cache based on header values and manually add As for why |
Yeah from what I've been able to gather through my testing/reading you are correct and like you say it is possible to manually add headers to the whitelist for GET and it works as expected. The issue with this is that redeploying changes will revert this back, so it makes automated deployments more difficult as you need to do that manual step. It would be nice if we could change the cache settings for |
Yup, I agree, another workaround for now is to use the |
Correct, we decided not to allow custom config. for |
+1 |
Is your feature request related to a problem? Please describe.
It doesn't seem possible to add to the whitelist for headers for anything other than
defaults
which is then overridden by the/api/*
rules.For example with this config:
I get the error
Setting custom cache behaviour for api/ route "/api/*" is not supported
Describe the solution you'd like
I want to be able to allow the
authorization
header to be passed up to my API routes, I can enable this by manually going into CloudFront and adding it to the whitelist, but this is overwritten every time I deploy so it's not really a workable solution when automating deployments. Or maybe I'm just doing it wrong.The text was updated successfully, but these errors were encountered: