mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Introduce ConfigurableWorker to make uvicorn respect FORCE_SCRIPT_NAME
This commit is contained in:
		
							
								
								
									
										11
									
								
								src/paperless/workers.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/paperless/workers.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
import os
 | 
			
		||||
from uvicorn.workers import UvicornWorker
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
 | 
			
		||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "paperless.settings")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ConfigurableWorker(UvicornWorker):
 | 
			
		||||
    CONFIG_KWARGS = {
 | 
			
		||||
        "root_path": settings.FORCE_SCRIPT_NAME or "",
 | 
			
		||||
    }
 | 
			
		||||
		Reference in New Issue
	
	Block a user