Skip to content

Commit cb7d715

Browse files
authored
Return a copy of responseHeaders in getResponseHeaders
Return a new HashMap instance of responseHeaders to prevent external modifications.
1 parent bb13864 commit cb7d715

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public String getReasonPhrase() {
129129
}
130130

131131
public Map<String, String> getResponseHeaders() {
132-
return responseHeaders;
132+
return new HashMap<>(responseHeaders);
133133
}
134134
}
135135

0 commit comments

Comments
 (0)