alienrpg icon indicating copy to clipboard operation
alienrpg copied to clipboard

Route prefix is not supported

Open mkahvi opened this issue 1 year ago • 5 comments

For example:

GET https://host/systems/alienrpg/images/IndBackground3.png 403 (Forbidden)

When it should be trying to access

https://host/myRoutePrefix/systems/alienrpg/images/IndBackground3.png

Problem is caused by starting paths with slash, forcing them to exit the route prefix scope.

So the asset path is defined as /systems/alienrpg/images/IndBackground3.png
When it should be systems/alienrpg/images/IndBackground3.png
Though this one since this is in CSS, it needs to be relative to the CSS file

Tested on version 3.1.8 since I can't update to Foundry v12 yet.

mkahvi avatar Sep 08 '24 14:09 mkahvi

What O/S is the server running on?

pwatson100 avatar Sep 08 '24 17:09 pwatson100

Win11, that doesn't matter for route prefix problem.

Also seen here with the panicked with the image path being broken due to it:
route-prefix

^ I can fix that by removing the initial slash from the image path. But needing to fix it every time is not great.

mkahvi avatar Sep 08 '24 22:09 mkahvi

I have tested V3.1.8 on my Win 11 system (running node.js) and am not seeing an issue. The image paths are valid as per Foundry VTT: /systems/alienrpg/images/panic.webp

image image

image

I am not sure where myRoutePrefix is coming from on your installation?

Just to make you aware I am not making any updates or changes to V3.1.8.

pwatson100 avatar Sep 09 '24 08:09 pwatson100

Ref: https://foundryvtt.com/article/configuration/

Fill in routePrefix in options.json and use the electron client to easily test how route prefix changes things.

mkahvi avatar Sep 09 '24 09:09 mkahvi

OK. I am on the same page now. I have corrected this in the next version but that will only support FVTT V12 I am afraid.
Thank you for bringing it to my attention.

pwatson100 avatar Sep 09 '24 11:09 pwatson100

Fixed in lastest release 3.2.2

pwatson100 avatar Feb 05 '25 11:02 pwatson100