sanitizedHeaders static method
Implementation
static Map<String, String>? sanitizedHeaders(Map<String, String>? headers) {
if (headers == null) {
return null;
}
final sanitizedHeaders = <String, String>{};
headers.forEach((key, value) {
if (!_securityHeaders.contains(key.toUpperCase())) {
sanitizedHeaders[key] = value;
}
});
return sanitizedHeaders;
}