mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-03 11:02:11 +08:00
Replaced string methods with HTTP consts
This commit is contained in:
@@ -40,7 +40,7 @@ func HandleRESTRequests(wg *sync.WaitGroup) {
|
||||
// should consider analyzing the allowed methods further
|
||||
headersOk := handlers.AllowedHeaders([]string{"Access-Control-Allow-Origin", "X-Requested-With", "Content-Type", "authorization"})
|
||||
originsOk := handlers.AllowedOrigins(strings.Split(servercfg.GetAllowedOrigin(), ","))
|
||||
methodsOk := handlers.AllowedMethods([]string{"GET", "PUT", "POST", "DELETE"})
|
||||
methodsOk := handlers.AllowedMethods([]string{http.MethodGet, http.MethodPut, http.MethodPost, http.MethodDelete})
|
||||
|
||||
for _, handler := range HttpHandlers {
|
||||
handler.(func(*mux.Router))(r)
|
||||
|
||||
Reference in New Issue
Block a user