BoostV / process-optimizer-frontend

A web frontend for ProcessOptimizer
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Properly fix routing when hosting in nginx #188

Closed langdal closed 1 year ago

langdal commented 2 years ago

When exporting to static distribution and hosting through an nginx the SPA routes are not correctly used for routing.

Steps to reproduce.

  1. Build using `yarn build-static
  2. Create docker image docker build -t test-image .
  3. Run container docker run --rm -it -p 3000:80 test-image
  4. Open page and go to a specific experiement
  5. Refresh page
  6. Observe one of two things depending on wether commit 171e152 is applied a. Observe that a 404 page is shown b. Immediately after refresh the Home screen is shown briefly before being redirected to the correct experiment

Expected behavior

The page should reload directly to the selected experiment