From 1578a82069f17ed84a86d4729bad203f92ae7e6b Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sat, 2 Sep 2023 09:19:14 +0200 Subject: [PATCH] Change default SVR.JS configuration. --- config.json | 21 +++++++++++++++------ index.html | 19 ++++++++++++++----- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/config.json b/config.json index 6014584..9380f15 100644 --- a/config.json +++ b/config.json @@ -19,7 +19,16 @@ "disableServerSideScriptExpose": true, "rewriteMap": [ { - "definingRegex": "/\\/invoke500\\/\\?/", + "definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/", + "replacements": [ + { + "regex": "/^\\/serverSideScript\\.js($|[#?])/", + "replacement": "/NONEXISTENT_PAGE$1" + } + ] + }, + { + "definingRegex": "/^\\/invoke500\\/\\?/", "replacements": [ { "regex": "/\\/invoke500\\/\\?/", @@ -28,7 +37,7 @@ ] }, { - "definingRegex": "/\\/invoke500\\/.+\\//", + "definingRegex": "/^\\/invoke500\\/.+\\//", "replacements": [ { "regex": "/\\/\\?/", @@ -45,7 +54,7 @@ ] }, { - "definingRegex": "/\\/invoke500\\/.+/", + "definingRegex": "/^\\/invoke500\\/.+/", "replacements": [ { "regex": "/\\?/", @@ -58,7 +67,7 @@ ] }, { - "definingRegex": "/\\/invoke500\\//", + "definingRegex": "/^\\/invoke500\\//", "replacements": [ { "regex": "/\\/invoke500\\//", @@ -67,7 +76,7 @@ ] }, { - "definingRegex": "/\\/invoke500$/", + "definingRegex": "/^\\/invoke500$/", "replacements": [ { "regex": "/\\/invoke500/", @@ -91,4 +100,4 @@ "disableUnusedWorkerTermination": false, "rewriteDirtyURLs": true, "errorPages": [] -} \ No newline at end of file +} diff --git a/index.html b/index.html index 6569ead..9b1060d 100644 --- a/index.html +++ b/index.html @@ -45,7 +45,16 @@   "disableServerSideScriptExpose": true,
  "rewriteMap": [
    {
-       "definingRegex": "/\\/invoke500\\/\\?/",
+       "definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/",
+       "replacements": [
+         {
+           "regex": "/^\\/serverSideScript\\.js($|[#?])/",
+           "replacement": "/NONEXISTENT_PAGE$1"
+         }
+       ]
+     },
+     {
+       "definingRegex": "/^\\/invoke500\\/\\?/",
      "replacements": [
        {
          "regex": "/\\/invoke500\\/\\?/",
@@ -54,7 +63,7 @@       ]
    },
    {
-       "definingRegex": "/\\/invoke500\\/.+\\//",
+       "definingRegex": "/^\\/invoke500\\/.+\\//",
      "replacements": [
        {
          "regex": "/\\/\\?/",
@@ -71,7 +80,7 @@       ]
    },
3.4.13     {
-       "definingRegex": "/\\/invoke500\\/.+/",
+       "definingRegex": "/^\\/invoke500\\/.+/",
      "replacements": [
        {
          "regex": "/\\?/",
@@ -84,7 +93,7 @@       ]
    },
    {
-       "definingRegex": "/\\/invoke500\\//",
+       "definingRegex": "/^\\/invoke500\\//",
      "replacements": [
        {
          "regex": "/\\/invoke500\\//",
@@ -93,7 +102,7 @@       ]
    },
    {
-       "definingRegex": "/\\/invoke500$/",
+       "definingRegex": "/^\\/invoke500$/",
      "replacements": [
        {
          "regex": "/\\/invoke500/",