mirror of
https://github.com/tinode/chat.git
synced 2025-03-14 10:05:07 +00:00
return CORS headers for POST and PUT in aws header handler
This commit is contained in:
@ -153,7 +153,8 @@ func (ah *awshandler) Init(jsconf string) error {
|
||||
|
||||
// Headers redirects to the AWS server.
|
||||
func (ah *awshandler) Headers(req *http.Request, serve bool) (http.Header, int, error) {
|
||||
if headers, status := media.CORSHandler(req, ah.conf.CorsOrigins, serve); status != 0 {
|
||||
headers, status := media.CORSHandler(req, ah.conf.CorsOrigins, serve)
|
||||
if status != 0 || req.Method == http.MethodPost || req.Method == http.MethodPut {
|
||||
return headers, status, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user