Skip to content

Conversation

@allouis
Copy link
Collaborator

@allouis allouis commented Dec 9, 2025

ref https://linear.app/ghost/issue/PRO-1550

After moving to CDN based storage with the S3Storage adapter, there may still be references to the old URLs in the wild. Rather than 404 we want to redirect to the CDN on the assumption that files have been migrated.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 9, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch push-tpmzsqqtpown

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

React E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 20052779429 -n playwright-report-react -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

return function (_req: unknown, _res: unknown, next: (err?: unknown) => void) {
next();
return (
req: {path: string},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let's import express types here and use them

ref https://linear.app/ghost/issue/PRO-1550

After moving to CDN based storage with the S3Storage adapter, there may
still be references to the old URLs in the wild. Rather than 404 we want
to redirect to the CDN on the assumption that files have been migrated.
}

const key = this.buildKey(relativePath);
res.redirect(301, `${this.cdnUrl}/${key}`);
Copy link
Member

Choose a reason for hiding this comment

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

Missing return statement on redirect? Not a bug here but adding return res.redirect(...) is a common pattern. Also makes it consistent with the early return return next();

@allouis allouis closed this Dec 10, 2025
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.

3 participants