checkLoadingAccess() — vite Function Reference
Architecture documentation for the checkLoadingAccess() function in static.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350["checkLoadingAccess()"] d91d6c8f_e2c2_3b92_12c3_391c9ba06183["static.ts"] fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 -->|defined in| d91d6c8f_e2c2_3b92_12c3_391c9ba06183 fc571085_3ab0_feca_5965_61c2be1d5c08["indexHtmlMiddleware()"] fc571085_3ab0_feca_5965_61c2be1d5c08 -->|calls| fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 449af0c1_44a5_1ad5_ce35_a183c1ef89e6["sirvOptions()"] 449af0c1_44a5_1ad5_ce35_a183c1ef89e6 -->|calls| fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 61b724c6_ba5c_8f04_178a_c9aa25554a99["isServerAccessDeniedForTransform()"] 61b724c6_ba5c_8f04_178a_c9aa25554a99 -->|calls| fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 13770e2a_c6d8_fb1f_6562_e66de7bc1deb["transformMiddleware()"] 13770e2a_c6d8_fb1f_6562_e66de7bc1deb -->|calls| fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 b5f75f2b_ae88_b9ce_360f_813018b7842e["isFileLoadingAllowed()"] fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 -->|calls| b5f75f2b_ae88_b9ce_360f_813018b7842e f094d39d_cd97_2548_86c3_38902c2f3301["slash()"] fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 -->|calls| f094d39d_cd97_2548_86c3_38902c2f3301 98952751_e0cf_2bf3_c4a0_2fde2526872b["isFileReadable()"] fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 -->|calls| 98952751_e0cf_2bf3_c4a0_2fde2526872b style fe25e7e9_e8e7_d04f_5c4c_9b4e6daa8350 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/server/middlewares/static.ts lines 314–327
export function checkLoadingAccess(
config: ResolvedConfig,
path: string,
): 'allowed' | 'denied' | 'fallback' {
if (isFileLoadingAllowed(config, slash(path))) {
return 'allowed'
}
if (isFileReadable(path)) {
return 'denied'
}
// if the file doesn't exist, we shouldn't restrict this path as it can
// be an API call. Middlewares would issue a 404 if the file isn't handled
return 'fallback'
}
Domain
Subdomains
Source
Frequently Asked Questions
What does checkLoadingAccess() do?
checkLoadingAccess() is a function in the vite codebase, defined in packages/vite/src/node/server/middlewares/static.ts.
Where is checkLoadingAccess() defined?
checkLoadingAccess() is defined in packages/vite/src/node/server/middlewares/static.ts at line 314.
What does checkLoadingAccess() call?
checkLoadingAccess() calls 3 function(s): isFileLoadingAllowed, isFileReadable, slash.
What calls checkLoadingAccess()?
checkLoadingAccess() is called by 4 function(s): indexHtmlMiddleware, isServerAccessDeniedForTransform, sirvOptions, transformMiddleware.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free