Skip to content
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

Conficient/fix#30 host header #32

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

conficient
Copy link
Contributor

When using Azure as a host for both a Cocoon and Legacy website, the host header set in the request should not be copied to the proxied request. If it is this causes Azure to redirect the request back to the Cocoon website causing a 400 bad request error.

This option is not required when using local development so I have added a new HostHeaderOption value to the CocoonProxyOptions class. This defaults to the current Cocoon behaviour so is a benign change for anyone unaffected by the problem.

When the Cocoon site is running on Azure App Service, the HostHeaderOption should be set to HostHeaderOptions.SetDefault.

I also added a third behaviour which sets the Host to the value of the DestinationPrefix URL of the proxy although I have not found a scenario where I needed this.

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

Successfully merging this pull request may close these issues.

1 participant