Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static reports 404 on sub-reports and thumbnails as /reports (leading slash) is hardcoded somewhere in _ctx.report.artifactUrl #201

Open
AshSimmonds opened this issue Apr 7, 2024 · 2 comments

Comments

@AshSimmonds
Copy link

AshSimmonds commented Apr 7, 2024

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.

screenshot_20240408-042746

screenshot_20240408-042838

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

@AshSimmonds
Copy link
Author

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.

@harlan-zw
Copy link
Owner

harlan-zw commented Apr 24, 2024

Hi, I think you might want the routerPrefix option? https://unlighthouse.dev/api/config#routerprefix

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

No branches or pull requests

2 participants