Update pool-server.go
This commit is contained in:
@@ -566,12 +566,12 @@ func (s *PoolServer) RemoveVoucherHandler(w http.ResponseWriter, r *http.Request
|
|||||||
|
|
||||||
func (s *PoolServer) Serve(mux *http.ServeMux) {
|
func (s *PoolServer) Serve(mux *http.ServeMux) {
|
||||||
|
|
||||||
mux.HandleFunc("OPTIONS /cart", func(w http.ResponseWriter, r *http.Request) {
|
// mux.HandleFunc("OPTIONS /cart", func(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
// w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||||
w.Header().Set("Access-Control-Allow-Methods", "GET, PUT, POST, DELETE")
|
// w.Header().Set("Access-Control-Allow-Methods", "GET, PUT, POST, DELETE")
|
||||||
w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
|
// w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
|
||||||
w.WriteHeader(http.StatusOK)
|
// w.WriteHeader(http.StatusOK)
|
||||||
})
|
// })
|
||||||
|
|
||||||
handleFunc := func(pattern string, handlerFunc func(http.ResponseWriter, *http.Request)) {
|
handleFunc := func(pattern string, handlerFunc func(http.ResponseWriter, *http.Request)) {
|
||||||
// Configure the "http.route" for the HTTP instrumentation.
|
// Configure the "http.route" for the HTTP instrumentation.
|
||||||
|
|||||||
Reference in New Issue
Block a user