Skip to content

Conversation

@peterpeterparker
Copy link
Contributor

@peterpeterparker peterpeterparker merged commit dfbd63f into main Oct 7, 2025
2 checks passed
@peterpeterparker peterpeterparker deleted the feat/prerender-canonical branch October 7, 2025 15:04
github-merge-queue bot pushed a commit to dfinity/oisy-wallet that referenced this pull request Oct 8, 2025
# Motivation

I'm not entirely sure this is a strict requirement for a SPA, even if
the pages are prerendered, since each page is behind a login screen and
ultimately rendered with JavaScript. However, while reviewing a
[PR](dfinity/internet-identity#3392 (comment))
in Internet Identity, it crossed my mind that it might be more accurate
to use a canonical URL - and correspondingly an `og:url` - that reflects
each subpage’s actual path rather than always pointing to the root. So,
this PR introduces a similar change to what I just implemented for Juno
([PR](junobuild/juno#2035)).

# Test

I tested the change locally, but it definitely needs to be verified the
next time you deploy to any environment.

# Notes

I'm really not certain this is necessary, so feel free to reject and
close the PR if you don’t think it adds value.

# Changes

- Added a script to update the canonical and `og:url` after build  
- Chained the script in the post-process step before calculating the CSP

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants