Closed wrinqhq closed 6 years ago
If you're running Postleaf in dev and you're not using a proxy, the port number must be included in APP_URL
.
However, in production you should never include a port in APP_URL
because Postleaf is intended to run behind a proxy such as Nginx.
This patch may fix stylesheets when your .env
file is misconfigured, but it doesn't account for everywhere else URLs are generated.
Addresses #81 to some extent
This fix allows the admin UI to look as expected. The css files resolve correctly.
If a port number like 3000 is specified on a production install and not included in
APP_URL
other functionality will still break as pointed out in the comments.A solution to that can be to construct the URL from the parameters supplied in the config file.
In the absolute function the port number may be appended if the existing url does not already contain a port number?
In the mean time this PR can atleast render the admin panel correctly.
Pull Request Summary
Please describe what your PR does here. Be detailed so the changes you're proposing are obvious.
All code contributions are subject to the terms of the Contributor License Agreement described in CONTRIBUTING.md.