Repository navigation
Enable HSTS in production and add HTTPS redirection - #1
Merged
Merged
Conversation
David Pine (IEvangelist)
requested review from
Copilot and
Jose Perez Rodriguez (joperezr)
October 29, 2025 11:32
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances security for the static host by adding HTTPS redirection and HSTS (HTTP Strict Transport Security) middleware, along with some minor code formatting improvements.
- Adds HSTS middleware (only enabled in production environments)
- Adds HTTPS redirection middleware
- Removes trailing whitespace from several lines
… code tabs/format nits
…or .NET SDK installation
…rity and consistency
… script redirects
…ct install-cli page
| <TabItem label="PowerShell" icon="seti:powershell"> | ||
| <Code | ||
| lang="powershell" | ||
| code='Invoke-RestMethod https://aspire.dev/install.ps1 -OutFile aspire-install.ps1' |
There was a problem hiding this comment.
should this instead be the exact line we use in the aspire repo? e.g. iex "& { $(irm https://aspire.dev/install.ps1) }" and curl bash for the non-Windows one
Member
Author
There was a problem hiding this comment.
Updated.
Jose Perez Rodriguez (joperezr)
approved these changes
Oct 30, 2025
Jose Perez Rodriguez (joperezr)
left a comment
Member
There was a problem hiding this comment.
Left some minor comments but otherwise this looks good
…n; update welcome banner with migration notice
Jose Perez Rodriguez (joperezr)
approved these changes
Oct 30, 2025
Jose Perez Rodriguez (joperezr)
approved these changes
Oct 30, 2025
This was referenced May 29, 2026
David Pine (IEvangelist)
pushed a commit
that referenced
this pull request
Oct 30, 2026
…next frame (#1993) ## Summary On the homepage's environment section (Local / Test / Production), switching environments is supposed to fade the new panel in. `HomeEnvironment.astro` removed `data-transition` with a 200 ms timer that started at click time. If a long task delayed the next rendering frame past that timer, the attribute was gone before style was recalculated. The fade never started, so visitors on busy or low-end devices got an abrupt swap. The same race is the recurring homepage E2E flake `fades environment changes and pauses independent resource motion`. It failed on the first attempt and passed on retry in 5 of the 15 most recent successful `ci.yml` runs I scanned. Both failures I inspected show the same signature: `data-test-fade-seen` Expected `"true"`, Received `"false"`. For example: - [run 41019013048, job 123945024940](https://github.com/microsoft/aspire.dev/actions/runs/41019013048/job/123945024940): the `Test` panel, retry #1 passed. - [run 40915515140, job 123611762564](https://github.com/microsoft/aspire.dev/actions/runs/40915515140/job/123611762564): the `Local` panel, retry #1 passed. **Fix:** after setting `data-transition`, call `nextPanel.getAnimations()`. This flushes style, so the CSS fade is created synchronously. The panels then settle when that animation's `finished` promise resolves, or immediately if no fade applies, for example when motion isn't active. No timeouts, sleeps or retries are added; the fixed timer is removed. Cancelled animations (a new selection, pause, hidden page or scrolling away) still go through the existing `settlePanels()` paths. **Regression test:** `starts the environment fade even when a long task delays the next frame` clicks `Test` and then blocks the main thread for 250 ms in the same task. It asserts that the fade's `animationstart` fires and that `data-transition` clears. No screenshots: the panel looks the same before and after once it settles. The fix restores a 180 ms opacity animation, which a still image can't show. The evidence is the `animationstart` assertion above. ## Third-party links and affiliations None ## Validation - New regression test, run locally against `astro dev` in desktop, tablet and mobile Chromium: - Without the fix, on the same branch: **9/9 failed** (3 repeats per project), with `data-test-fade-seen` Expected `"true"`, Received `"false"`. This matches the CI flake. - With the fix: **30/30 passed** (10 repeats per project). - All homepage tests matching `environment`, run twice each across the 3 projects (including the existing fade test): 24/24 passed. - `vitest run`: 82 files; 1108 passed, 1 skipped. - `eslint . --max-warnings 0` passes, and `prettier --check` on `HomeEnvironment.astro` passes. The new test block is Prettier-clean; `homepage.spec.ts` already has a Prettier warning on `main`. **🤖 Posted by AspireAgent (AI Agent)** Co-authored-by: davidfowl <[email protected]> Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In this PR:
SynchedTabscomponent, now that the nativeTabscomponent supports sync.Install Aspire CLIcontent..slnxto repo root directory.