File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,17 @@ import { AngularBootstrap, renderAngular } from './utils/ng';
2727import { promiseWithAbort } from './utils/promise' ;
2828import { buildPathWithParams , joinUrlParts , stripLeadingSlash } from './utils/url' ;
2929
30+ /**
31+ * A set of well-known URLs that are not handled by Angular.
32+ *
33+ * These URLs are typically for static assets or endpoints that should
34+ * bypass the Angular routing and rendering process.
35+ */
36+ const WELL_KNOWN_NON_ANGULAR_URLS : ReadonlySet < string > = new Set < string > ( [
37+ 'favicon.ico' ,
38+ '.well-known/appspecific/com.chrome.devtools.json' ,
39+ ] ) ;
40+
3041/**
3142 * Maximum number of critical CSS entries the cache can store.
3243 * This value determines the capacity of the LRU (Least Recently Used) cache, which stores critical CSS for pages.
@@ -166,6 +177,10 @@ export class AngularServerApp {
166177 */
167178 async handle ( request : Request , requestContext ?: unknown ) : Promise < Response | null > {
168179 const url = new URL ( request . url ) ;
180+ if ( WELL_KNOWN_NON_ANGULAR_URLS . has ( url . pathname ) ) {
181+ return null ;
182+ }
183+
169184 this . router ??= await ServerRouter . from ( this . manifest , url ) ;
170185 const matchedRoute = this . router . match ( url ) ;
171186
You can’t perform that action at this time.
0 commit comments