pwatson100 / alienrpg

Alien RPG system for Foundry VTT.
GNU General Public License v3.0
38 stars 31 forks source link

Route prefix is not supported #290

Open mkahvi opened 2 months ago

mkahvi commented 2 months ago

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.

pwatson100 commented 2 months ago

What O/S is the server running on?

mkahvi commented 2 months ago

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.

pwatson100 commented 2 months ago

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.

mkahvi commented 2 months ago

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.

pwatson100 commented 2 months ago

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.