File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ export default function CopyUrl({
32
32
let path = origin_path
33
33
? window . location . pathname . split ( origin_path ) [ 0 ]
34
34
: window . location . pathname ;
35
+ if ( path . includes ( import . meta. env . VITE_XREDS_BASE_URL ) ) {
36
+ path = path . replace ( import . meta. env . VITE_XREDS_BASE_URL , '' ) ;
37
+ }
35
38
if ( path . endsWith ( '/' ) ) {
36
39
path = path . slice ( 0 , - 1 ) ;
37
40
}
@@ -59,6 +62,9 @@ export default function CopyUrl({
59
62
origin_path ,
60
63
) [ 0 ]
61
64
: window . location . pathname ;
65
+ if ( path . includes ( import . meta. env . VITE_XREDS_BASE_URL ) ) {
66
+ path = path . replace ( import . meta. env . VITE_XREDS_BASE_URL , '' ) ;
67
+ }
62
68
if ( path . endsWith ( '/' ) ) {
63
69
path = path . slice ( 0 , - 1 ) ;
64
70
}
Original file line number Diff line number Diff line change @@ -11,11 +11,7 @@ class SPAStaticFiles(StaticFiles):
11
11
12
12
async def get_response (self , path : str , scope ):
13
13
try :
14
- if (
15
- not path .endswith (".js" )
16
- and not path .endswith (".css" )
17
- and not path .endswith (".html" )
18
- ):
14
+ if not '.' in path :
19
15
raise HTTPException (status_code = 404 )
20
16
return await super ().get_response (path , scope )
21
17
except HTTPException as ex :
You can’t perform that action at this time.
0 commit comments