Skip to content

Set new HTTPS environment variable when using out of process #16713

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

Merged
merged 3 commits into from
Nov 1, 2019

Conversation

jkotalik
Copy link
Contributor

Fixes #15243.

Today, ANCMV2 started setting the ASPNETCORE_HTTPS_PORT. This affected 2.2 applications that updated ANCMV2 to start always redirecting to HTTPS if the RedirectionMiddleware was enabled, as redirecting didn't work in 2.2 with ANCM.

This fix adds a new HTTPS_PORT environment variable called ANCM_HTTPS_PORT, which is now set by ANCM instead of HTTPS_PORT. The HttpsRedirectionMiddleware has also been updated to start reading this new value as a backup to the HTTPS_PORT. This means that if HTTPS_PORT is set, it will still always win over the ANCM port.

@BillHiebert this could affect IISExpress; when you set the HTTPS_PORT, do you set it to the HTTPS_PORT iisexpress is going to listen on? If so, then this change shouldn't break anything; the HTTPS_PORT still wins.

WIP because I still want to add another test with the HttpsRedirectionMiddleware.

@Pilchie for 3.1 approval

@jkotalik jkotalik added feature-iis Includes: IIS, ANCM area-servers labels Oct 31, 2019
@jkotalik jkotalik added this to the 3.1.0-preview3 milestone Oct 31, 2019
@jkotalik jkotalik requested a review from analogrelay as a code owner October 31, 2019 21:26
@jkotalik jkotalik self-assigned this Oct 31, 2019
@Pilchie
Copy link
Member

Pilchie commented Oct 31, 2019

Scenario approved for 3.1.0-Preview3, assuming code reviews and CI are good before the cutoff.

@jkotalik jkotalik changed the title [WIP] Set new HTTPS environment variable when using out of process Set new HTTPS environment variable when using out of process Nov 1, 2019
@jkotalik
Copy link
Contributor Author

jkotalik commented Nov 1, 2019

@BrennanConroy TransportCommunicatesErrorToApplicationWhenClientDisconnectsAbnormally (SignalR test), known flaky? https://dev.azure.com/dnceng/public/_build/results?buildId=411560&view=ms.vss-test-web.build-test-results-tab&runId=12900532&resultId=105256&paneView=debug

@BrennanConroy
Copy link
Member

known flaky?

😢 no

@jkotalik jkotalik merged commit 4d3eccc into release/3.1 Nov 1, 2019
@jkotalik jkotalik deleted the jkotalik/ChangeSettingHttpsPort branch November 1, 2019 19:57
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-iis Includes: IIS, ANCM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants