fix(backend-http): no-cache options request (??)

This commit is contained in:
ShiKhu 2021-07-22 10:54:52 +08:00
parent 6952deeea8
commit fb398f52ed

View file

@ -66,7 +66,7 @@ func main() {
w.Header().Set("Access-Control-Allow-Methods", "POST")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type,Authorization")
if r.Method == http.MethodOptions {
w.Header().Set("Cache-Control", "max-age=86400")
//w.Header().Set("Cache-Control", "max-age=86400")
w.WriteHeader(http.StatusOK)
return
}