Static reports 404 on sub-reports and thumbnails as `/reports` (leading slash) is hardcoded somewhere in `_ctx.report.artifactUrl`
AshSimmonds opened this issue · 3 comments
Describe the bug
Only been playing with it an hour or so, can't pinpoint exactly where yet, but when you deploy a static site that's in a sub-directory, some of the thumbnails and all the individual page reports have the URL beginning with /reports/
, which refers back to example.com/reports/unlighthouse-report/the-file
, instead of example.com/unlighthouse-report/reports/the-file
.
What's attempting to be fetched:
https://mayfairfinanceaustralia.com/reports/businessfinance/screenshot.jpeg
Actual URL example:
https://mayfairfinanceaustralia.com/seo/reports/20240408_0243/reports/businessfinance/screenshot.jpeg
Reproduction
No response
System / Nuxt Info
No response
Update: the issue is in the payload.js
file, I just did a find/replace for artifactUrl":"/reports
to remove the leading slash and everything works, so wherever that initial generation comes from.
Hi, I think you might want the routerPrefix
option? https://unlighthouse.dev/api/config#routerprefix