VincentSaelzler / hyper-homelab

A foray into hyper-converged architecture.
GNU General Public License v3.0
0 stars 0 forks source link

allow app to run within a path of main site #194

Open VincentSaelzler opened 2 years ago

VincentSaelzler commented 2 years ago

idea is to run collatz page on saelzler.com/collatz

using haproxy, can configure everything to get correctly to home page of collatz app i wrote a while ago

frontend http-websites
  acl begins_collatz path -i -m beg /collatz
  use_backend collatz if begins_collatz
backend collatz
  http-request set-path "%[path,regsub(^/collatz/?,/)]"

However, all of the links on the app think the root of the site is "/" therefore, clicking the contact page goes to /contact for example. the home button just links to /.

On the next request, haproxy no longer realizes we are within the collatz app.

For the next app I write, good workaround seems to be here: https://stackoverflow.com/questions/58340979/how-to-add-global-route-prefix-in-asp-net-core-3

app.UsePathBase(new PathString("/api/service"));