Skip to content

Correct the internal URL shape: per-app subdomain, no path prefix - #14

Merged
stefan-burke merged 1 commit into
mainfrom
sharedservices-subdomain-shape
Sep 3, 2026
Merged

Correct the internal URL shape: per-app subdomain, no path prefix#14
stefan-burke merged 1 commit into
mainfrom
sharedservices-subdomain-shape

Conversation

@stefan-burke

Copy link
Copy Markdown
Collaborator

While preparing the shared-services-infra registration PR for this app, I read the platform's static-app layer and found our earlier URL assumption was wrong:

  • The layer's endpoint_url output is https://<name>.apps.<domain>each app is served at the root of its own subdomain
  • A CloudFront edge (origin-request) function reads the app name from the request and rewrites the URI to the per-app S3 prefix transparently — the site never sees a path

That means the internal build must not set PATH_PREFIX: the previous workflow derived PATH_PREFIX: // from the S3 slot, which would have double-prefixed every internal link, image, and Pagefind path.

Changes:

  • sharedservices-deploy.yaml: build step no longer sets PATH_PREFIX (left unset → defaults to /); header comments updated to describe SITE_URL as the app's endpoint URL and STATIC_PREFIX as the S3 slot only
  • docs/devops-sharedservices-setup.html: step 1 now asks DevOps for four hand-back values (adds the endpoint_url), the callout explains subdomain + edge-rewrite serving, the step 2 table rows for STATIC_PREFIX/SITE_URL and step 3–4 texts corrected
  • README: SharedServices section updated to the subdomain-at-root shape

Verification: precommit gate green.

Reading the shared-services-infra static-app layer shows each app is
served at the root of its own subdomain — the layer's endpoint_url
output is https://<name>.apps.<domain> and a CloudFront edge function
maps the subdomain to the app's S3 prefix behind the scenes. The
workflow no longer derives PATH_PREFIX from STATIC_PREFIX (which would
double-prefix every internal link), and the guide and README now
describe SITE_URL as the endpoint URL and STATIC_PREFIX as the S3 slot
only.
@stefan-burke
stefan-burke merged commit 728e55f into main Sep 3, 2026
4 checks passed
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.

1 participant