Bootstrap-Listr icon indicating copy to clipboard operation
Bootstrap-Listr copied to clipboard

Q: benefits in explicit server name for local assets?

Open bard opened this issue 9 years ago • 2 comments
trafficstars

I was wondering if there are any benefits in generating asset refs containing protocol/host when assets are local. In other words if this:

  <link rel="stylesheet" href="http://localhost/listr/assets/css/font-awesome.min.css" />

...is better than this:

  <link rel="stylesheet" href="/listr/assets/css/font-awesome.min.css" />

The reason I ask is that I'm testing Listr on an appliance which will be accessed via IP. As it is, admins at a deployment site would have to set the appliance's IP in nginx config so that nginx could report it to PHP's SERVER_NAME correctly. If host/protocol were ignored for refs to local assets, no special configuration would be needed.

bard avatar Dec 29 '15 19:12 bard

If I got this right, you would love to specify relative URLs to your assets? I think that you currently have to specify absolute URLs to overcome the forwarder (which was contributed, so I can't say for sure!) I will look into it when I have time for it.

idleberg avatar Dec 29 '15 22:12 idleberg

Yes, correct, relative URLs to assets would be my ideal target scenario.

bard avatar Dec 30 '15 06:12 bard