Conversation
* Add a base tag to use as a reference for PLA's subpath * Update css urls to be relative to the css file's location * Update Javascript URLs to use the base tag when preparing API requests
The CSS is already imported in app.css and the JS import takes precedence and messes relative load locations required to be able to host PLA with a prefix.
552b83a to
0a22c7e
Compare
|
Seems ok to me, let me know if I need to make changes |
|
Hi @Ayowel - thanks for putting this together. When I started out with v2, I did consider whether I would need to support running pla in a subpath, and went down the path of implementing root hosting to get something out the door quickly. (I wanted to stop the bug reports with 1.2 that I had no intention of addressing). While I'm not sure of the use case for running PLA in a path, having all URI's relative is something that should be in place - which by definition should then support running PLA in a sub path. I've not thought about the impacts of the work you've done and I think it would need to be fully tested this before merging it. I did start on the path of writing unit testing, and while that needs a lot more work, this might be the catalyst to complete it, or at least get the core methods tested. I dont expect you to write the unit testing, but I'll do that first before merging this. So you will need to rebase this once I've got that done. Appreciate your work - thank you. |
|
Hi @Ayowel - thanks again for this PR. Its taken me a bit of time to get this PR working correctly - hopefully I've nutted everything out. There were problems where I was able to get redirects working in a subpath, but it broke PLA when working in a root path (and visa versa). I've updated the dev image that includes 725589a so feel free to try it out and let me know if you find anything still not working correctly. |
|
After a quick test, this does not look ok.Using the provided |
With PLA 1, it is possible to host the application in a subpath (e.g.:
/phpldapadmin) instead of at the root of a website. This MR tries to restore this behavior for easier/more natural migration from one version to the other.Please provide feedback on the implementation choices, I'm unsure as to whether they are ideal or even standard.
With these changes, no specific configuration is required in PLA as long as the reverse proxy provides all needed headers.
Test nginx configuration (in
assets/nginx.conf):Test compose (in
compose.yml, the repository is expected to be in theprojectdirectory):