Page MenuHomePhabricator

[server] Pass req.originalUrl instead of req.url to getAppURLFactsFromRequestURL
ClosedPublic

Authored by ashoat on Mar 29 2022, 3:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 12:12 AM
Unknown Object (File)
Sun, Nov 10, 12:12 AM
Unknown Object (File)
Sun, Nov 10, 12:06 AM
Unknown Object (File)
Tue, Nov 5, 1:24 AM
Unknown Object (File)
Oct 8 2024, 2:16 PM
Unknown Object (File)
Oct 8 2024, 2:14 PM
Unknown Object (File)
Oct 8 2024, 2:14 PM
Unknown Object (File)
Oct 8 2024, 10:07 AM

Details

Summary

Following our changes to use Express routers directly, we realized that they are stripping the baseRoutePath out.

See the docs for req.originalUrl:

the “mounting” feature of app.use() will rewrite req.url to strip the mount point.

Depends on D3555

Test Plan
  1. We tested the landing page, the SquadCal app, and the Comm app
  2. We made sure we tried configs where baseRoutePath !== basePath
  3. We also checked view-source to make sure things were set correctly
  4. We made sure there were no errors in the browser console
  5. We played around with the site, logging in and navigating and making sure things worked correctly
  6. We tried loading a specific URL for a specific chat directly

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable