Skip to content

Resolve port config key/env variable confusion - #37399

Open
guardrex wants to merge 5 commits into
mainfrom
guardrex/env-var-confusion
Open

Resolve port config key/env variable confusion#37399
guardrex wants to merge 5 commits into
mainfrom
guardrex/env-var-confusion

Conversation

@guardrex

@guardrex guardrex commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #37391

This should 🤞🍀 resolve any confusion that readers may have over the config keys and env vars for ...

  • HTTPS_PORT/ASPNETCORE_HTTPS_PORT (HTTPS redirection middleware)
  • HTTPS_PORTS/ASPNETCORE_HTTPS_PORTS (Kestrel/HTTP.sys endpoint port config)

... and the latter only applies to .NET 8 or later. Some of the updates here are to correct versioning.

Plus, I found a bunch of little NIT corrections to make along the way ... improved tables, article conventions to apply, improved headings, grammar/style NITs, etc. A big one that I'm updating across the repo is sentences before tables that have a colon instead of a period.

@guardrex guardrex self-assigned this Jul 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates ASP.NET Core documentation to reduce confusion between the HTTPS redirection port settings (HTTPS_PORT / ASPNETCORE_HTTPS_PORT) and the Kestrel/HTTP.sys endpoint port settings (HTTP_PORTS/HTTPS_PORTS and ASPNETCORE_HTTP_PORTS/ASPNETCORE_HTTPS_PORTS, .NET 8+), and applies a broad set of table-intro punctuation/style fixes across the repo.

Changes:

  • Adds/propagates clarifying notes about singular (HTTPS_PORT) vs plural (HTTPS_PORTS) port settings and consolidates HTTP_PORTS/HTTPS_PORTS guidance into a shared include.
  • Updates several articles to match style guidance (periods before tables, heading tweaks, minor grammar fixes).
  • Updates versioning/moniker usage and refreshes ms.date metadata in touched articles.

Reviewed changes

Copilot reviewed 62 out of 62 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
aspnetcore/web-api/jsonpatch/includes/jsonpatch9.md Punctuation update before tables.
aspnetcore/signalr/configuration/includes/configuration7.md Punctuation update before tables.
aspnetcore/signalr/configuration/includes/configuration6.md Punctuation update before tables.
aspnetcore/signalr/configuration/includes/configuration5.md Punctuation update before tables.
aspnetcore/signalr/configuration/includes/configuration3.md Punctuation update before tables.
aspnetcore/signalr/configuration/includes/configuration3.1.md Punctuation update before tables.
aspnetcore/signalr/configuration/includes/configuration2.2.md Punctuation update before tables.
aspnetcore/signalr/configuration/includes/configuration2.1.md Punctuation update before tables.
aspnetcore/signalr/configuration.md Punctuation update before tables.
aspnetcore/security/includes/docker-https6.md Docker HTTPS run command adjustments for URL/port configuration.
aspnetcore/security/enforcing-ssl/includes/enforcing-ssl8.md Heading update and adds note clarifying HTTPS port settings.
aspnetcore/security/enforcing-ssl/includes/enforcing-ssl7.md Heading update for HTTPS redirection section.
aspnetcore/security/enforcing-ssl/includes/enforcing-ssl6.md Heading update for HTTPS redirection section.
aspnetcore/security/enforcing-ssl.md Updates ms.date, heading, and adds clarifying note about port settings.
aspnetcore/security/docker-https.md Updates ms.date and adds clarifying notes about port settings.
aspnetcore/security/authentication/individual.md Punctuation update before tables.
aspnetcore/release-notes/aspnetcore-9/includes/web_asset_delivery.md Punctuation update before tables.
aspnetcore/release-notes/aspnetcore-8.0.md Replaces inline HTTP_PORTS/HTTPS_PORTS section with shared include; updates ms.date.
aspnetcore/razor-pages/index/includes/index35.md Punctuation update before table.
aspnetcore/razor-pages/index.md Punctuation update before table.
aspnetcore/performance/caching/response.md Punctuation update before table.
aspnetcore/mvc/views/working-with-forms.md Punctuation update before table.
aspnetcore/mvc/views/razor.md Punctuation update before table.
aspnetcore/mvc/controllers/routing.md Punctuation update before tables.
aspnetcore/migration/50-to-60-samples.md Punctuation update before table.
aspnetcore/migration/21-to-22.md Punctuation update before table.
aspnetcore/migration/20-to-21.md Punctuation update before table.
aspnetcore/includes/mvc-intro/model7.md Punctuation update before table.
aspnetcore/includes/mvc-intro/model4.md Punctuation update before table.
aspnetcore/includes/http-ports.md Refines shared HTTP_PORTS/HTTPS_PORTS guidance and adds clarification note.
aspnetcore/grpc/supported-platforms.md Punctuation update before table.
aspnetcore/grpc/retries.md Punctuation update before tables.
aspnetcore/grpc/protobuf.md Punctuation update before tables.
aspnetcore/grpc/configuration.md Punctuation update before tables.
aspnetcore/fundamentals/servers/kestrel/security-considerations.md Table formatting update; clarifies HTTPS redirection option sources; adds note about port-setting confusion.
aspnetcore/fundamentals/servers/kestrel/endpoints.md Uses shared http-ports include and normalizes include syntax; updates ms.date.
aspnetcore/fundamentals/servers/httpsys/includes/httpsys8-9.md Normalizes include syntax for shared http-ports include.
aspnetcore/fundamentals/servers/httpsys.md Normalizes include syntax for shared http-ports include; updates ms.date.
aspnetcore/fundamentals/routing/includes/routing3-7.md Punctuation update before tables (multiple occurrences).
aspnetcore/fundamentals/routing.md Punctuation update before tables.
aspnetcore/fundamentals/openapi/includes/include-metadata9.md Punctuation update before table.
aspnetcore/fundamentals/openapi/includes/include-metadata10.md Punctuation update before tables.
aspnetcore/fundamentals/openapi/includes/api_endpoint_operation.md Punctuation update before table.
aspnetcore/fundamentals/openapi/include-metadata.md Punctuation update before tables.
aspnetcore/fundamentals/native-aot/includes/native-aot8.md Punctuation update before table.
aspnetcore/fundamentals/native-aot.md Punctuation update before table.
aspnetcore/fundamentals/minimal-apis/includes/webapplication9.md Adds/updates port-setting guidance and note; formatting/punctuation updates.
aspnetcore/fundamentals/minimal-apis/includes/webapplication8.md Adds/updates port-setting guidance and note; formatting/punctuation updates.
aspnetcore/fundamentals/minimal-apis/includes/webapplication7.md Formatting/punctuation updates.
aspnetcore/fundamentals/minimal-apis/includes/webapplication10.md Adds/updates port-setting guidance and note; formatting/punctuation updates.
aspnetcore/fundamentals/minimal-apis/includes/route-handlers.md Punctuation update before table.
aspnetcore/fundamentals/minimal-apis/includes/minimal-apis6.md Punctuation update before tables.
aspnetcore/fundamentals/middleware/index.md Punctuation update before table.
aspnetcore/fundamentals/host/generic-host/samples/6.x/GenericHostSample/Snippets/Program.cs Removes unused/obsolete snippet block for HTTPS ports.
aspnetcore/fundamentals/host/generic-host.md Updates ms.date, adjusts moniker range for HTTPS ports section, and inlines sample.
aspnetcore/fundamentals/dependency-injection.md Punctuation update before table.
aspnetcore/diagnostics/aspdepr-ids.md Punctuation update before table.
aspnetcore/client-side/spa/includes/angular3-7.md Adds port-setting clarification notes in the Angular SPA proxy guidance.
aspnetcore/client-side/spa/angular.md Updates ms.date.
aspnetcore/blazor/tutorials/movie-database-app/part-2.md Replaces “following table” lead-in with bullet list lead-in.
aspnetcore/blazor/security/index.md Fixes duplicated word (“The the”).
aspnetcore/blazor/forms/index.md Fixes duplicated word (“The the”).
Comments suppressed due to low confidence (2)

aspnetcore/includes/http-ports.md:6

  • The environment variable examples are fenced as json, but they aren't JSON. Consider changing the fence language (for example, to cli or console) so syntax highlighting and semantics match the content.
    aspnetcore/client-side/spa/includes/angular3-7.md:211
  • This include is for >= aspnetcore-6.0 < aspnetcore-8.0, but the added note calls out HTTPS_PORTS/ASPNETCORE_HTTPS_PORTS, which are .NET 8+ endpoint-port settings. In this versioned include, the note is likely to confuse readers and should be removed or moved to the >= aspnetcore-8.0 content.
> [!NOTE]
> Don't confuse the `HTTPS_PORTS` configuration key and `ASPNETCORE_HTTPS_PORTS` environment variable, which set the port for Kestrel/HTTP.sys endpoint configuration, with the `HTTPS_PORT` configuration key and `ASPNETCORE_HTTPS_PORT` environment variable, which set the port for [HTTPS redirection middleware](xref:security/enforcing-ssl#https-redirection-middleware-usehttpsredirection).

Comment thread aspnetcore/fundamentals/minimal-apis/includes/webapplication8.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/includes/webapplication9.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/includes/webapplication10.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/includes/webapplication7.md Outdated
Comment thread aspnetcore/fundamentals/openapi/include-metadata.md Outdated
Comment thread aspnetcore/includes/http-ports.md Outdated
Comment thread aspnetcore/fundamentals/servers/kestrel/endpoints.md
Comment thread aspnetcore/fundamentals/servers/httpsys.md
Comment thread aspnetcore/client-side/spa/includes/angular3-7.md Outdated
Comment thread aspnetcore/security/enforcing-ssl.md Outdated

This comment was marked as resolved.

@guardrex
guardrex requested a review from wadepickett July 29, 2026 20:28
Comment thread aspnetcore/fundamentals/minimal-apis/includes/webapplication10.md Outdated

@wadepickett wadepickett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@guardrex, Looks great. I only spotted one very minor item I noted inline.

Co-authored-by: Wade Pickett <wpickett@microsoft.com>
@guardrex

guardrex commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @wadepickett ... and it will need one more ✔️ after that commit.

Review from wadepickett is stale because it was submitted before the most recent code changes.

😩

@guardrex
guardrex removed the request for review from tdykstra July 29, 2026 22:59
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.

Resolve port environment variable confusion between HTTPS redirection middleware and Kestrel/HTTP.sys endpoint config

3 participants