1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Block all non GET requests to CDN (#1226)

This commit is contained in:
nobody
2022-11-29 07:03:15 +01:00
parent c9d2eb85ce
commit 0465b630d1
4 changed files with 24 additions and 0 deletions

View File

@@ -173,6 +173,15 @@ const WebRequest = {
'EXTRA_HEADERS': 'extraHeaders'
};
const BlockedRequestMethods = {
'POST': true,
'HEAD': true,
'PUT': true,
'DELETE': true,
'TRACE': true,
'OPTIONS': true,
};
const WebRequestType = {
'MAIN_FRAME': 'main_frame',
'SUB_FRAME': 'sub_frame',
@@ -434,6 +443,7 @@ const LogString = {
'REPLACED_RESOURCE': 'Replaced resource:',
'MISSING_RESOURCE': 'Missing resource:',
'EVIL_RESOURCE_BLOCKED': 'Evil resource blocked:',
'NON_GET_REQUEST_BLOCKED': 'Non-GET-Request blocked',
};
// Supported charsets for TextDecoder()