Work around having no access to Apache SetEnv variables
This commit is contained in:
		
							parent
							
								
									faa2b431c6
								
							
						
					
					
						commit
						624b9cf3d7
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		| 
						 | 
					@ -1 +1,11 @@
 | 
				
			||||||
from prolefeeder import app as application
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def application(req_environ, start_response):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Work around having no access to Apache SetEnv variables:
 | 
				
			||||||
 | 
					    for k in ['SECRET_KEY', 'DATA_DIR', 'TMP_DIR', 'MAX_LENGTH', 'KBITS']:
 | 
				
			||||||
 | 
					        if k in req_environ:
 | 
				
			||||||
 | 
					            os.environ[k] = req_environ[k]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    from prolefeeder import app as _application
 | 
				
			||||||
 | 
					    return _application(req_environ, start_response)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue