embetty-server icon indicating copy to clipboard operation
embetty-server copied to clipboard

URL_BASE does not seem to work as intended

Open Luux opened this issue 4 years ago • 0 comments

General information

  • embetty-server version: 2.0.3 (Docker version heiseonline/embetty-server:2.0.3)
  • Node.js version: 12.16.1
  • Operating system name and version: Ubuntu 18.04.5 LTS (Host)
  • Browser name and version: -

Steps to reproduce the behaviour

Ok, this bug did cost me hours, lol. I installed the docker image of embetty-server to implement embetty for my homepage, which URL is called [webpage.tld] in the following examples. I configured the server so that it can be called from localhost:3000 on the host, which worked just fine. However, as soon as I wanted to use nginx to forward [webpage.tld]/embetty-server/ to [domain.tld]:3000 to handle SSL etc., I ran into 404 errors for no obvious reason.

After hours of fiddling around with different ports, nginx settings and so on, I tried to configure a subdomain "embetty-server.[domain.tld]" instead, which works just as intended. I also used nginx there for the configuration: embetty-server.[domain.tld]:8080 -> embetty-server.[webpage.tld:3000], which works flawlessly.

My suspicion: the URL_BASE variable, which was set to [webpage.tld]/embetty-server/ did not work as expected. Therefore, the server failed at parsing for example GET /embetty-server/version, where "embetty-server" should be substituted by the given URL_BASE path. Therefore, this leads to 404 errors for [webpage.tld]/embetty-server/version (-> GET /embetty-server/version results in 404) where [webpage.tld]:3000/version (-> GET /version) just worked fine.

Expected behaviour

In the example above, GET /embetty-server/version should work just fine if URL_BASE is set to [webpage.tld]/embetty-server/

Actual behaviour

GET /embetty-server/version results in 404 errors. The GET requests arrive at the server according to the docker logs, however it seems that they are not parsed correctly.

Luux avatar Nov 01 '20 21:11 Luux