Refactor routing and documentation for SPA deployment

- Updated the application to serve the SPA from the root path instead of /map/, enhancing accessibility.
- Modified redirect logic to ensure backward compatibility with old /map/* URLs.
- Adjusted documentation across multiple files to reflect the new routing structure and API endpoints.
- Improved handling of OAuth redirects and session management in the backend.
- Updated frontend configuration to align with the new base URL settings.
This commit is contained in:
2026-02-25 00:32:59 +03:00
parent 2c7bf48719
commit fea17e6bac
11 changed files with 73 additions and 69 deletions

View File

@@ -186,7 +186,7 @@ func (a *App) oauthCallback(rw http.ResponseWriter, req *http.Request, provider
Secure: req.TLS != nil,
SameSite: http.SameSiteLaxMode,
})
redirectTo := "/map/profile"
redirectTo := "/profile"
if st.RedirectURI != "" {
if u, err := url.Parse(st.RedirectURI); err == nil && u.Path != "" && !strings.HasPrefix(u.Path, "//") {
redirectTo = u.Path