Commit Graph

22 Commits

Author SHA1 Message Date
Michael Manganiello
45aeaf3265 fix: Backend URL redirection logic
Fix FastAPI and nginx configuration, to make the application correctly
redirect URLs. This is specially useful when URLs ended with forward
slash are redirected to their stripped version.

Included changes:
* Stop removing the `/api` prefix in nginx rewrite rules, so FastAPI
  knows what's the original URL path being requested.
* Use `$http_host` in nginx, so FastAPI receives both the original host
  and port, to build the redirect URL (as `$host` does not include the
  port, if present).
* Make all FastAPI included routers know their prefix, to correctly
  route incoming requests.

This fix was found based on a report that redirects from URLs ended with
forward slash were not working [1].

[1] https://github.com/rommapp/romm/issues/1051#issuecomment-2269049762
2024-08-05 11:15:52 -03:00
Georges-Antoine Assi
880345f20c ruff-only pre-commit 2024-05-18 12:05:57 -04:00
Psych0D0g
8f5536c69b switch to gunicorn for handling backend app 2024-03-25 21:56:19 +01:00
Georges-Antoine Assi
8a7193d0e4 Add route in nginx for assets that 404s 2024-03-12 15:47:59 +00:00
Georges-Antoine Assi
4b97e21f46 Merge branch 'master' into webrcade-feed 2023-12-27 19:34:58 -05:00
Lukas Wingerberg
74e8875f64 Update nginx default.conf 2023-11-14 09:24:57 +01:00
Lukas Wingerberg
adf8127295 refactor init script and add error handling via watchdog loop 2023-10-31 22:39:08 +01:00
zurdi
174a43888b unlimited client_max_body_size in nginx 2023-10-31 10:01:43 +01:00
zurdi
7001511e26 fix - romm user added to nginx config and dockerfile 2023-10-25 01:33:45 +02:00
Lukas Wingerberg
db282479b0 switch uvicorn and nginx to communicate via unix socket instead of tcp 2023-10-22 13:05:03 +02:00
Lukas Wingerberg
8015558398 refactor to alpine base and fix some more paths to work on readonly rootfs 2023-10-22 12:45:34 +02:00
Lukas Wingerberg
71874810e1 make nginx run successfully on readonly rootfs 2023-10-22 10:55:31 +02:00
Georges-Antoine Assi
c92d8b620b Add access control headers to reponse 2023-09-17 12:13:20 -04:00
Georges-Antoine Assi
7b67495c23 Fix nginx config 2023-08-19 22:00:20 -04:00
Georges-Antoine Assi
c1d1291b48 Expose swaggerui and redoc endpoints 2023-08-18 23:40:18 -04:00
Georges-Antoine Assi
a8a402d250 Add scopes and roles 2023-08-10 23:37:05 -04:00
zurdi zurdo
302b8cf073 scan websocket migrated to socket.io 2023-05-11 14:17:30 +02:00
zurdi zurdo
95b27f2b9f autoreload images on rom change 2023-03-23 22:11:10 +01:00
zurdi zurdo
daf00aac59 nginx config fixed 2023-03-23 20:13:27 +01:00
zurdi zurdo
ba30aa095f proxy redirect to api added in vite 2023-03-17 13:21:49 +01:00
zurdi zurdo
90cb69450b vite proxy to api redirect added 2023-03-17 13:09:25 +01:00
zurdi zurdo
8954554d8e workflow build task moved to external script 2023-03-17 12:25:06 +01:00