Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Add replacements for hostName and hostPort #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fanste
Copy link

@fanste fanste commented Mar 7, 2019

The replacement variable hostonly could be useful in combination with reverse proxy to replace the host dynamically but let the port be static

Could be useful in combination with reverse proxy to replace the host dynamically but let the port be static
@@ -87,6 +88,12 @@ func (instance *ruleReplaceAction) contextRequestValueBy(name string) (string, b
return request.Method, true
case "host":
return request.Host, true
case "hostonly":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Maybe you can change it to hostName and add another line for hostPort, too. That it might be aligned.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to get the default port in error case? Is it enough to test the scheme and return 80 or 443?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this makes sense.

@blaubaer blaubaer changed the title Fix #34 Add replacements for hostName and hostPort May 31, 2019
@blaubaer
Copy link
Member

PS: Please do not forget to adjust the README.md, too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants