Skip to content

VSB-TUO/Fix dspace-customers 1083 R22: SSR cache keyed by origin and language, no static file outside static-files - #1708

Merged
milanmajchrak merged 1 commit into
customer/vsb-tuofrom
vsb-tuo/fe-ssr-host-header-cache-key
Nov 3, 2026
Merged

milanmajchrak merged 1 commit into
customer/vsb-tuofrom
vsb-tuo/fe-ssr-host-header-cache-key

Conversation

@milanmajchrak

Copy link
Copy Markdown
Collaborator

References

Port of dtq-dev PR 1669 (commit 60f6ccb). dspace-customers issue 1083, finding R22.

Description

The SSR page caches were keyed by req.url only, and the bot cache was read before the login check. Now the key holds origin, path and language, the bot cache serves only anonymous requests, and a static page name like ..%2Findex is refused.

Instructions for Reviewers

  • server.ts and new ssr-cache-key.util.ts: the same as the source.
  • html-content.service.ts: only the isPlainFileName guard is taken. Not applicable: the Host header part. On vsb-tuo this service builds a relative URL and never reads req.protocol or the Host header, so there is nothing to replace.
  • html-content.service.spec.ts does not exist on vsb-tuo. The new file holds only the source test for the guard (..%2Findex makes no request). The source tests for the Host header and the namespace do not apply here.
  • The title differs from the source because the Host header part does not apply.
  • Tests: ssr-cache-key.util.spec.ts and html-content.service.spec.ts.

Checklist

  • My PR is created against the branch it ports to
  • My PR is small in size
  • My PR follows the code conventions and passes ESLint
  • My PR passes all specs and includes new or updated specs
  • My PR includes details on how to test it
  • No new dependencies, no new configuration

🤖 Generated with Claude Code

…language, no static file outside static-files

Port of dtq-dev PR 1669 (commit 60f6ccb). html-content.service on
vsb-tuo builds a relative URL and never read the Host header, so only the
isPlainFileName guard is taken from that file. The new spec holds only the
source test for that guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milanmajchrak
milanmajchrak merged commit 0767027 into customer/vsb-tuo Nov 3, 2026
5 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