-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run homer-app (homer-ui) from subdirectory #467
Comments
Your report is appreciated. Please star this repository to motivate its developers! ⭐ |
created a pull request for this under homer-ui repo |
GangZhuo
added a commit
to GangZhuo/homer-app
that referenced
this issue
Jul 19, 2024
…m a sub directory such as '/homer7' Step: 1. Set 'http_settings.base_path' as below: ``` { ... "http_settings": { "debug": false, "enable": true, "gzip": true, "gzip_static": true, "help": "Settings for the HOMER Webapp Server. If you have gzip_static = false, please be sure that your dist directory has uncompressed .js files", "host": "0.0.0.0", "path": "/", "port": 8010, "root": "/usr/local/homer/dist", "base_path": "/homer7" }, ... } ``` 2. `cd /usr/local/homer/dist`, then open 'index.html', then change window['base-href'] as below: ``` window['base-href'] = '/homer7/'; ``` also change `<base href="/">`: ``` <base href="/homer7/"> ``` 3. `gzip -d main.832aad29e0146c430e55.js.gz`, then search `apiUrl:location.protocol+"//"+location.host+"api/v3"`, then change to `apiUrl:location.protocol+"//"+location.host+(window['base-href']?window['base-href']:"/")+"api/v3"`, and then `gzip main.832aad29e0146c430e55.js` snapshot as below: ``` var b8t=Object.defineProperty,v8t=Object.defineProperties, ......... b0={ production:!0, environment:DT, isHomerAPI:!0, apiUrl:location.protocol+"//"+location.host+(window['base-href']?window['base-href']:"/")+"api/v3" }; var F0=me(6738),Xue=me(9346);let Pr=(()=>{class ............... ``` Maybe fix sipcapture#467
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when running homer-app from a sub directory such as /homer the assets are unable to load.
![screen96](https://user-images.githubusercontent.com/8816264/153278770-aab3a468-f569-4d7a-adb0-45ba956792f2.jpg)
angular base href is defaulted to /
possible solution is to update the package.json of homer-ui with base-href in build.
"build": "ng build --base-href ${BASE_HREF:-/} .....
The text was updated successfully, but these errors were encountered: