Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theCocoonProxyOptions
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.