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
implement header_upstream directive for #4, docs #8
Conversation
Hm.. for some strange reasons I cannot log into travis-ci.org and restart the failed pipeline. It failed with:
Since all other tests succeeded, I'll assume that a restart would indeed let the tests pass. @coopernurse do you want to review the changes or can I merge? |
README.md
Outdated
``` | ||
header_upstream X-Forwarded-For {remote} | ||
header_upstream X-Forwarded-Host {hostonly} | ||
header_upstream X-Forwarded-Proto {scheme} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a link to https://caddyserver.com/docs/placeholders in this doc section so folks know the valid set of placeholder variables.
It might also be nice to add an example that didn't use a placeholder, just to given an example of how that could be useful.
config.go
Outdated
// uses caddy's integrated replacer for placeholder replacement (https://caddyserver.com/docs/placeholders) | ||
for k, v := range c.UpstreamHeaders { | ||
replInt := r.Context().Value(httpserver.ReplacerCtxKey) | ||
replacer := replInt.(httpserver.Replacer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should replacer
be defined outside the loop? I haven't read the docs on that type but I'm assuming we can safely call Replace()
using the same instance inside the loop. Is that true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of little things, but overall looks good!
I'm not sure what's up with the travis build status. I restarted both jobs but I'm not seeing status reported here for some reason. I think when the above issues are addressed we can just merge it and see if it builds correctly from master. |
…older examples for header_upstream to README and linked caddy's placeholder docs
Good points! You're right, Edit: but now the tests fail. I'm tired and will look into it tomorrow.
|
Now it should be ok. |
Requested changes were incorporated
@coopernurse How do we request changes to https://caddyserver.com/docs/http.awslambda ? |
@erdii Thanks for getting those changes in - it's merged now. Good question re: docs. I see mention of a developer portal now (fancy). I'll try to get in there and push an update. |
Nice! |
I was able to login and push an update. That kicked off a build somewhere and about 10 minutes later I got an email saying it worked. However, this page still shows the old 2017 'last updated' date. https://caddyserver.com/docs/http.awslambda So I'm not sure if there's anything else for us to do. Maybe the site docs only refresh daily? Let's keep an eye on it and see if it changes. But I think we're done. |
No description provided.