Server.js icon indicating copy to clipboard operation
Server.js copied to clipboard

assetsPath doesn't follow baseURL

Open pheyvaer opened this issue 8 years ago • 2 comments

A configuration with the subdirectory does not work. I tried with both a subdomain and a subdirectory. You can reproduce the problem trying the following.

Subdomain

baseURL: "http://data.example.com". If I curl for, e.g., the stylesheet on the machine where the server is running the correct file is returned (curl http://localhost:50000/assets/styles/ldf-server).

Subdirectory

baseURL: "http://example.com/data/". If I curl for, e.g., the stylesheet on the machine where the server is running an HTML file is returned that says that No resource with URL /assets/styles/ldf-server was found (curl http://localhost:50000/assets/styles/ldf-server) and the access logs show a 404 response.

pheyvaer avatar Jun 16 '17 12:06 pheyvaer

This is only for assets, I presume, not for the datasources?

There's a separate assetsPath which defaults to /assets/. We could have it default to baseUrl + "/assets/'.

RubenVerborgh avatar Jun 16 '17 12:06 RubenVerborgh

Yes, it's only for the assets (as far as I can tell).

pheyvaer avatar Jun 16 '17 12:06 pheyvaer