mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:52:50 +08:00
FEATURE: Add Content-Type header to CORS
- add Content-Type to Access-Control-Allow-Headers - update test accordingly
This commit is contained in:
parent
ebe7835316
commit
1826626272
|
@ -39,7 +39,7 @@ class Discourse::Cors
|
|||
end
|
||||
|
||||
headers['Access-Control-Allow-Origin'] = origin || cors_origins[0]
|
||||
headers['Access-Control-Allow-Headers'] = 'X-Requested-With, X-CSRF-Token, Discourse-Visible, User-Api-Key, User-Api-Client-Id'
|
||||
headers['Access-Control-Allow-Headers'] = 'Content-Type, X-Requested-With, X-CSRF-Token, Discourse-Visible, User-Api-Key, User-Api-Client-Id'
|
||||
headers['Access-Control-Allow-Credentials'] = 'true'
|
||||
end
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ describe Hijack do
|
|||
|
||||
expected = {
|
||||
"Access-Control-Allow-Origin" => "www.rainbows.com",
|
||||
"Access-Control-Allow-Headers" => "X-Requested-With, X-CSRF-Token, Discourse-Visible, User-Api-Key, User-Api-Client-Id",
|
||||
"Access-Control-Allow-Headers" => "Content-Type, X-Requested-With, X-CSRF-Token, Discourse-Visible, User-Api-Key, User-Api-Client-Id",
|
||||
"Access-Control-Allow-Credentials" => "true"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user