Answer the question
In order to leave comments, you need to log in
How to make axios negotiate requests?
Hello! Please help me figure it out.
In general, the situation is as follows. From the client application (Vue.js), an axios (ajax) request is made to the URL of the backend application (Golang), which interacts with Kerberos for SSO (single sign-on) authorization. When accessing the URL address, you need to return information about the employee.
When physically accessing this URL through a browser, it turns out to pull out information about the employee. When accessed through the client application, it returns HTTP 401 Unauthorized Negotiate
.
The client application itself stated the following:
axios.get(
url,
{
withCredentials: true
}
)
headers := handlers.AllowedHeaders([]string{"X-Requested-With", "Content-Type", "Authorization"})
methods := handlers.AllowedMethods([]string{"GET", "POST", "PATCH", "PUT", "DELETE", "OPTIONS"})
origins := handlers.AllowedOrigins([]string{"*"})
credentials := handlers.AllowCredentials() // true
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question