-
Notifications
You must be signed in to change notification settings - Fork 66
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
Proxing changes cache-control from public to private #16
Comments
Are you specifying the passThrough options? Since it defaults to false it won't pass the headers.
|
Ok, this would solve the problem with the cache headers. But I do not really want to have the proxy pass all headers from the client to the upstream. I do specify my custom headers in a mapUri, does this overwrite the passthrough option in the upstream direction? |
Yes, if you send the custom headers it will overwrite the ones of the original request even if the |
Shall i enhance the documentation to make this clearer? If yes, is this more a hapi or an h2o2 issue? |
I think the documentation should be here. Send a PR :) |
@thomaspeklak I'll close this issue and you can create a new one with a PR |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
I am trying to proxy an endpoint with hapi that provides a cache control header (
max-age=30, must-revalidate, public
). When I specify a simpleonResponse
handler withreply(res)
(see below) all headers are passed correctly. Removing this handler and letting hapi do the work, results in a cache-control header ofno-cache
.This was expected. I need to specify
ttl: "upstream"
in the route config, to pass along the cache headers. But then the cache-control header changes from public to private: 'max-age=30, must-revalidate, private'``Dumb onResponseHandler:
The text was updated successfully, but these errors were encountered: