azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.65k stars 130 forks source link

[BUG]: App assets don't respect path prefix #345

Closed douglasg14b closed 3 weeks ago

douglasg14b commented 3 weeks ago

What happened?

When I install the IT-Tools app, and use a path prefix instead of a host, the cosmosdomain.com/toolbox page loads, however all the assets for this site try and resolve to cosmosdomain.com/assets instead of cosmosdomain.com/toolbox/assets.

What should have happened?

Assets should be resolving to the path prefix.

How to reproduce the bug?

  1. Fresh cosmos
  2. Add IT-Tools
  3. Use path prefix instead of host
  4. Navigate to the prefix
  5. Take not of HTTP request failures

Relevant log output

If I try and use the proxy mode:

http: proxy error: dial tcp: lookup IT-Tools on 127.0.0.53:53: server misbehaving

Other details

No response

System details

azukaar commented 3 weeks ago

Apps have to explicitely support base path in order to work with path prefix, you can't stick it on top of any app. If you dont have a domain, use different ports, or .local domains to run multiple apps