Refactor controller and handlers

This commit is contained in:
TwinProduction committed 2021-09-12 18:39:09 -04:00
1 parent d86afb2381
commit c57a930bf3
19 files changed
+871 -623

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
package handler
import "net/http"
func DevelopmentCORS(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "http://localhost:8081")
next.ServeHTTP(w, r)
})
}