-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: custom Host header. #59
Conversation
Hello @ISNing, Thanks for your interest in this Traefik plugin ! Could you add unit tests for your changes for future backward compatibility ? |
Yes for sure, I will try to add that after I made everything work :) |
edabbee
to
225d49c
Compare
@tomMoulard Everything seems works well (atleast for unit tests) |
If you opened this bug fix, you should have a use case where this PR would fix a bug, right ? |
@tomMoulard Thanks for your remindness, I've tested it with the docker image. It works as expected. (Sorry for didn't read the readme) |
Okay, I will do further real life tests on my side! Do you mind refacto a little the code? func deleteHeader(request, header) {
if strings.EqualFold(rule.Header, "Host") {
req.Host = ""
} else {
header.Del(rule.Header)
}
} that could be called like |
In fact, I thought about it when I first started writing the code, but I didn't do it because I wasn't familiar with go and didn't know which file to put them is better. So, how would you like to name the file? Maybe |
Personally, I would create a |
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.
@tomMoulard It seems to be a typo of the original code, I think you may should give it a look.
rw.Header().Del(rule.Name) |
Indeed, this seems to be a typo, thanks for catching it up! |
I finished and pushed this minutes before.
And do you want me to open another pr to correct this? Or you may prefer to correct it by yourself? |
Please do correct it! 💯 |
Done here: #63 |
(sorry for my misoperation deleting the branch |
I am trying to push a review commit, but I get a permission denied when I try to push. I get the following: $ git push
To github.com:ISNing/htransformation.git
! [remote rejected] ISNing/main -> ISNing/main (permission denied)
error: failed to push some refs to 'github.com:ISNing/htransformation.git' Do you mind allowing me to push to your repository ? Otherwise I will get forced to open another PR that will overseed this one. |
I've invite you to be collaborator of my repository. |
Thanks a lot ! the latest release |
traefik/traefik#6502