mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	- svc-ai-ollama: - Add preload_models (llama3, mistral, nomic-embed-text) - Pre-pull task: loop_var=model, async-safe changed_when/failed_when - sys-svc-proxy (OpenResty): - Forward Authorization header - Ensure proxy_pass_request_headers on - web-app-openwebui: - ADMIN_EMAIL from users.administrator.email - Request RBAC group scope in OAUTH_SCOPES Ref: ChatGPT support (2025-09-23) — https://chatgpt.com/share/68d20588-2584-800f-aed4-26ce710c69c4
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
| {% set location = location | default("/")%}
 | |
| location {{location}}
 | |
| {
 | |
|   {% if oauth2_proxy_enabled | default(false) | bool %}
 | |
|     {% include 'roles/web-app-oauth2-proxy/templates/following_directives.conf.j2'%}
 | |
|   {% endif %}
 | |
| 
 | |
|   {% set _loc = location|trim %}
 | |
|   proxy_pass http://127.0.0.1:{{ http_port }}{{ (_loc|regex_replace('^(?:=|\\^~)\\s*','')) if not (_loc is match('^(@|~)')) else '' }};
 | |
| 
 | |
|   # headers
 | |
|   proxy_set_header Host $host;
 | |
|   proxy_set_header Authorization $http_authorization;
 | |
|   proxy_set_header X-Real-IP $remote_addr;
 | |
|   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 | |
|   proxy_set_header X-Forwarded-Proto $scheme;
 | |
|   proxy_set_header X-Forwarded-Port {{ WEB_PORT }};
 | |
|   proxy_pass_request_headers on;
 | |
| 
 | |
|   {% include 'roles/sys-svc-proxy/templates/headers/content_security_policy.conf.j2' %}
 | |
| 
 | |
|   # WebSocket specific header
 | |
|   proxy_http_version 1.1;
 | |
|   proxy_set_header Upgrade $http_upgrade;
 | |
|   proxy_set_header Connection "upgrade";
 | |
| 
 | |
|   # timeouts
 | |
|   proxy_connect_timeout     5s;
 | |
|   proxy_send_timeout        900s;
 | |
|   proxy_read_timeout        900s;
 | |
|   send_timeout              900s;
 | |
|   
 | |
|   {% set proxy_lua_enabled = proxy_lua_enabled | default(true) | bool %}
 | |
|   # Buffering needs to be activ, so that lua can do str replaces
 | |
|   proxy_buffering           {{ 'on' if proxy_lua_enabled else 'off' }}; 
 | |
|   proxy_request_buffering   {{ 'on' if proxy_lua_enabled else 'off' }};
 | |
| 
 | |
|   {% if proxy_lua_enabled %}
 | |
|   proxy_set_header Accept-Encoding "";
 | |
|   {% include 'roles/sys-front-inj-all/templates/location.lua.j2'%}
 | |
|   {% endif %}
 | |
| } |