diff options
author | Moonchild <moonchild@palemoon.org> | 2022-11-06 12:31:17 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-11-06 12:31:17 +0000 |
commit | 84d3226fb1dba87cfa7e16a0277628b407cf683d (patch) | |
tree | 199ecd2bdcd63aa897ef8aca1013456227ff03ba /dom/fetch/InternalResponse.cpp | |
parent | 42d1d20efd5c6167900bf5c67531a0d4b4498183 (diff) | |
download | uxp-84d3226fb1dba87cfa7e16a0277628b407cf683d.tar.gz |
Issue #2024 - Part 1: Add wildcard to Access-Control-Expose-Headers
For requests without credentials, add wildcard to Access-Control-Expose-Headers.
Diffstat (limited to 'dom/fetch/InternalResponse.cpp')
-rw-r--r-- | dom/fetch/InternalResponse.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dom/fetch/InternalResponse.cpp b/dom/fetch/InternalResponse.cpp index d99df3d7dc..ec32c4e216 100644 --- a/dom/fetch/InternalResponse.cpp +++ b/dom/fetch/InternalResponse.cpp @@ -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(); } |