mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-30 04:01:31 +08:00 
			
		
		
		
	fix(server): package.json not accessible
This commit is contained in:
		
							parent
							
								
									83058e91b0
								
							
						
					
					
						commit
						b678e4ea28
					
				| @ -34,7 +34,9 @@ async function register(app: express.Application) { | |||||||
|                 let url = req.url; |                 let url = req.url; | ||||||
|                 url = url.replace(/^\/src/, ""); |                 url = url.replace(/^\/src/, ""); | ||||||
|                 if (!url.startsWith("/@")) { |                 if (!url.startsWith("/@")) { | ||||||
|  |                     if (!url.startsWith("/package.json")) { | ||||||
|                         url = "/src" + url; |                         url = "/src" + url; | ||||||
|  |                     } | ||||||
|                     url = url.replace(/\.js$/, ".ts"); |                     url = url.replace(/\.js$/, ".ts"); | ||||||
|                 } |                 } | ||||||
|                 url = `/${assetPath}/app${url}`; |                 url = `/${assetPath}/app${url}`; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran