mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-04 03:27:12 -05:00 
			
		
		
		
	Refs feedback - replace multiline logic with single line
This commit is contained in:
		
							parent
							
								
									4e5ee24618
								
							
						
					
					
						commit
						70608f7e31
					
				@ -95,11 +95,7 @@ MIDDLEWARE_CLASSES = [
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
# We allow CORS from localhost:8080
 | 
			
		||||
CORS_ORIGIN_WHITELIST = ("localhost:8080")
 | 
			
		||||
_allowed_cors_hosts = os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS")
 | 
			
		||||
if _allowed_cors_hosts:
 | 
			
		||||
    CORS_ORIGIN_WHITELIST = tuple(_allowed_cors_hosts.split(","))
 | 
			
		||||
 | 
			
		||||
CORS_ORIGIN_WHITELIST = tuple(os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "localhost:8080").split(","))
 | 
			
		||||
 | 
			
		||||
# If auth is disabled, we just use our "bypass" authentication middleware
 | 
			
		||||
if bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user