MM-58263 Remove CSRF check from /api/v4/client_perf (#27011)
We use navigator.sendBeacon to send the new metrics since it's recommended for that, but it doesn't let us set custom headers which means that we can't set the CSRF token header that we'd need to pass that check
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cd51dec6e5
Коммит
8f9d1b802c
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func (api *API) InitClientPerformanceMetrics() {
|
||||
api.BaseRoutes.APIRoot.Handle("/client_perf", api.APISessionRequired(submitPerformanceReport)).Methods("POST")
|
||||
api.BaseRoutes.APIRoot.Handle("/client_perf", api.APISessionRequiredTrustRequester(submitPerformanceReport)).Methods("POST")
|
||||
}
|
||||
|
||||
func submitPerformanceReport(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Ссылка в новой задаче
Block a user