- 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.
18 lines
314 B
Go
18 lines
314 B
Go
package app
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func (a *App) redirectLogout(rw http.ResponseWriter, req *http.Request) {
|
|
if req.URL.Path != "/logout" {
|
|
http.NotFound(rw, req)
|
|
return
|
|
}
|
|
s := a.getSession(req)
|
|
if s != nil {
|
|
a.deleteSession(s)
|
|
}
|
|
http.Redirect(rw, req, "/login", http.StatusFound)
|
|
}
|