Skip to content

Commit 9268bf6

Browse files
committed
add ngx-quill to spa routes and fix spa route check
1 parent dcc162a commit 9268bf6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/SIL.XForge.Scripture/Startup.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public class Startup
8383
"styles",
8484
"en",
8585
"quill",
86+
"ngx-quill",
8687
// Lynx-related
8788
"worker",
8889
"node_modules_sillsdev_lynx",
@@ -372,6 +373,10 @@ internal bool IsSpaRoute(HttpContext context)
372373
if (spaRoutes.Contains(beginning))
373374
return true;
374375

376+
// Check if path starts with route token. Match paths like '/ngx-quill-quill-SOME_HASH.js'
377+
if (spaRoutes.Any(routeToken => exact.StartsWith(routeToken + "-") || exact.StartsWith(routeToken + ".")))
378+
return true;
379+
375380
return false;
376381
}
377382
}

test/SIL.XForge.Scripture.Tests/StartupTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ private static void IsSpaRoute_Helper(string path, RunMode[] runModes, bool expe
145145
[TestCase("/en-Q7R8S9T0.js.map")]
146146
[TestCase("/quill-U1V2W3X4.js")]
147147
[TestCase("/quill-U1V2W3X4.js.map")]
148+
[TestCase("/ngx-quill-quill-U1V2W3X4.js.map")]
148149
[TestCase("/3rdpartylicenses.txt")]
149150
[TestCase("/safety-worker.js")]
150151
[TestCase("/sf-service-worker.js")]

0 commit comments

Comments
 (0)