mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Issue #2024 - Part 1: Add wildcard to Access-Control-Expose-Headers
For requests without credentials, add wildcard to Access-Control-Expose-Headers.
This commit is contained in:
parent
2f0acd868e
commit
211b7cf219
6 changed files with 40 additions and 16 deletions
|
|
@ -17,12 +17,15 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
InternalResponse::InternalResponse(uint16_t aStatus, const nsACString& aStatusText)
|
||||
InternalResponse::InternalResponse(uint16_t aStatus,
|
||||
const nsACString& aStatusText,
|
||||
RequestCredentials aCredentialsMode)
|
||||
: mType(ResponseType::Default)
|
||||
, mStatus(aStatus)
|
||||
, mStatusText(aStatusText)
|
||||
, mHeaders(new InternalHeaders(HeadersGuardEnum::Response))
|
||||
, mBodySize(UNKNOWN_BODY_SIZE)
|
||||
, mCredentialsMode(aCredentialsMode)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +186,7 @@ InternalResponse::CORSResponse()
|
|||
MOZ_ASSERT(!mWrappedResponse, "Can't CORSResponse a already wrapped response");
|
||||
RefPtr<InternalResponse> cors = CreateIncompleteCopy();
|
||||
cors->mType = ResponseType::Cors;
|
||||
cors->mHeaders = InternalHeaders::CORSHeaders(Headers());
|
||||
cors->mHeaders = InternalHeaders::CORSHeaders(Headers(), mCredentialsMode);
|
||||
cors->mWrappedResponse = this;
|
||||
return cors.forget();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue