Skip to content

Organize HTTP routes better#204

Merged
ethanjli merged 14 commits intomasterfrom
organize-http-routes
Jan 9, 2026
Merged

Organize HTTP routes better#204
ethanjli merged 14 commits intomasterfrom
organize-http-routes

Conversation

@ethanjli
Copy link
Copy Markdown
Collaborator

@ethanjli ethanjli commented Jan 7, 2026

This PR groups the HTTP routes (for static assets, for the GUI, and for the API) for easier reverse-proxying.

TODOs:

  • Change the base URL path from / to /imswitch for easier reverse-proxying
  • Change the path of the GUI (under the base path) from /imswitch/index.html to /ui/index.html, so that the full URL path is /imswitch/ui/index.html
  • Group the paths of the API routes in to /api, so that the full URL paths all begin with /imswitch/api
  • Ensure that no API routes are missing as a result of the reorganization
  • Move the Swagger API docs page to /imswitch/api/docs
  • Update URLs (e.g. for static assets and for API routes) in the Swagger API docs page
  • Update URLs (e.g. for static assets and for API routes) in https://github.com/openUC2/ImSwitch-ReactAPP
  • Ensure that the socket.io route is being used under /imswitch
  • Ensure that any references to /libs/* (e.g. for imjoy) are updated appropriately
  • Ensure that Jupyter notebook has a reasonable URL

This work is tracked on Notion at https://www.notion.so/Reverse-proxy-ImSwitch-on-port-80-via-our-ingress-proxy-28a4e612c78a80b6a78ce8938edaacd1?source=copy_link

@ethanjli
Copy link
Copy Markdown
Collaborator Author

ethanjli commented Jan 8, 2026

Attached are the openapi.json contents (after human-readable reformatting) generated by FastAPI after the above commit (9d40424) from the current HEAD of the master branch (commit 856d94d):

From visually scrolling through every line of the diff between these two files, I have confirmed that no API routes have been lost with the above refactoring.

@ethanjli ethanjli marked this pull request as ready for review January 9, 2026 11:14
@ethanjli
Copy link
Copy Markdown
Collaborator Author

ethanjli commented Jan 9, 2026

I haven't tested every single API endpoint, but I've tested things overall and they all seem to work. So I'm going to merge this PR now!

@ethanjli ethanjli added this pull request to the merge queue Jan 9, 2026
Merged via the queue into master with commit 212570d Jan 9, 2026
15 checks passed
@ethanjli ethanjli deleted the organize-http-routes branch January 9, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant