mirror of
https://github.com/actions/add-to-project.git
synced 2025-12-14 05:57:15 +00:00
Fix regex for content type check in index.js
Addresses https://github.com/actions/add-to-project/security/code-scanning/8
This commit is contained in:
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
@@ -5068,7 +5068,7 @@ async function getResponseData(response) {
|
|||||||
if (/application\/json/.test(contentType)) {
|
if (/application\/json/.test(contentType)) {
|
||||||
return response.json().catch(() => response.text()).catch(() => "");
|
return response.json().catch(() => response.text()).catch(() => "");
|
||||||
}
|
}
|
||||||
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
|
if (!contentType || /^(text\/|charset=utf-8)$/.test(contentType)) {
|
||||||
return response.text();
|
return response.text();
|
||||||
}
|
}
|
||||||
return getBufferResponse(response);
|
return getBufferResponse(response);
|
||||||
@@ -31286,4 +31286,4 @@ module.exports = parseParams
|
|||||||
/******/
|
/******/
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
||||||
|
|||||||
Reference in New Issue
Block a user