usnistgov / dioptra

Test Software for the Characterization of AI Technologies
https://pages.nist.gov/dioptra/
Other
220 stars 33 forks source link

[BUG] Refreshing page on frontend when using containers leads to 404 error. #579

Open keithmanville opened 2 months ago

keithmanville commented 2 months ago

Describe the bug When running the frontend in the containers, refreshing the UI causes a 404 error, and the user needs to manually navigate back to the root URL.

This issue is documented here: https://router.vuejs.org/guide/essentials/history-mode.html#HTML5-Mode

Proposed fix is to add this to the nginx configuration for the REST API fallback service:

location / {
  try_files $uri $uri/ /index.html;
}

To Reproduce Steps to reproduce the behavior:

  1. Run the frontend in the container
  2. refresh the page
  3. The user will see a 404 error
ashley-rice commented 2 months ago

I'm also having this issue. I have 2 questions:

  1. To what nginx configuration file should this fix be added?
  2. I am unable to submit a job as it seems like I am not getting a response from the API, despite the ports being exposed. Could this 404 error be related?