Allow CORS PATCH method

This commit is contained in:
Kevin van Zonneveld 2013-05-08 16:09:53 +02:00
parent 4344ba8b5d
commit 965521f51b
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ func main() {
// Allow CORS for almost everything. This needs to be revisted / limited to
// routes and methods that need it.
w.Header().Add("Access-Control-Allow-Origin", "*")
w.Header().Add("Access-Control-Allow-Methods", "HEAD,GET,PUT,POST,DELETE")
w.Header().Add("Access-Control-Allow-Methods", "HEAD,GET,PUT,POST,PATCH,DELETE")
w.Header().Add("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Content-Disposition, Final-Length")
w.Header().Add("Access-Control-Expose-Headers", "Location, Range, Content-Disposition")