CSS link is an absolute URL breaking layout
windware-ono opened this issue · comments
Summary
If I run the instance on port 3000 and access it there without a reverse proxy, one of the CSS (/assets/css/lib.css) is linked as an absolute URL, which breaks the linking if the host name is not exactly specified including the port in .env for APP_URL. (ex : http://my.domain:3000/, instead of just http://my.domain/).
Steps to Reproduce
- Install as normal.
- node app
- Access directly without a reverse proxy http://my.domain:3000/
Additional info
- Postleaf version: 1.0.0-beta.1
- Node version: 8.9.4
- Affected browsers:
- Operating system: Ubuntu 16.04
This is a side effect of running Postleaf locally (it's intended to run behind a proxy such as Nginx). If you're doing local dev, the [current] requirement is to put the fully URL (including port) in your .env file.
Asset URLs could probably be changed to schemaless URLs. Aside from that, I don't see how the app could know what the proper URL should be.