Stylesheets independent from hostname
Virtual Research Environment / On-line Bibliography Manager
Brought to you by:
sirfragalot
Hello,
I installed wikindxon a server in the intranet of my company. Accessing it from there works.
However, when I'm home and create a tunnel with local port forwarding to my machine,
I can still access wikindx but the stylesheets are not loaded. I suspect this is due to the hardcoded HOSTNAME. When I call it from remote, the address is of course different due to the tunnel (it's localhost:4444 then...
Best,
Thomas
We'll look into it Thomas, Is this v6.0.1?
Mark
Hi Mark,
Yes, if Thomas doesn't use 6.0.1.
It's not a bug of wikindx, a limitation only. Adding a port change the url and break CSS/JS include and potentially other direct access to data files.
A simple way to work around the problem is to inline the CSS / JS in the HTML pages when rendering the template, or to make all the includes relative (but the vhost must be correctly configured and the code not simply installed in a sub-folder).
Regards,
Last edit: Stéphane Aulery 2020-01-22
Hello Thomas,
Did you update to 6.0.1?
When you do the mapping, do you cleanly proxy by rewriting urls and referers ?
Regards,
Last edit: Stéphane Aulery 2020-01-22
Considered solution:
Since style sheets are small, include the sheets by inlining instead of links. The loading time will also be reduced with fewer HTTP requests. So :