forked from jan-leila/nix-config
		
	added extra config to services
This commit is contained in:
		
							parent
							
								
									62abf65e5a
								
							
						
					
					
						commit
						8b39a80849
					
				
					 3 changed files with 56 additions and 1 deletions
				
			
		|  | @ -31,12 +31,42 @@ in { | |||
|             { | ||||
|               ${config.host.jellyfin.subdomain} = { | ||||
|                 target = "http://localhost:${toString jellyfinPort}"; | ||||
|                 extraConfig = '' | ||||
|                   client_max_body_size 20M; | ||||
|                   add_header X-Content-Type-Options "nosniff"; | ||||
|                   add_header Content-Security-Policy "default-src https: data: blob: ; img-src 'self' https://* ; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' https://www.gstatic.com https://www.youtube.com blob:; worker-src 'self' blob:; connect-src 'self'; object-src 'none'; frame-ancestors 'self'; font-src 'self'"; | ||||
|                   add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), battery=(), bluetooth=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), keyboard-map=(), local-fonts=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=(), serial=(), sync-xhr=(), usb=(), xr-spatial-tracking=()" always; | ||||
| 
 | ||||
|                   proxy_set_header Host $host; | ||||
|                   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-Protocol $scheme; | ||||
|                   proxy_set_header X-Forwarded-Host $http_host; | ||||
| 
 | ||||
|                   proxy_buffering off; | ||||
|                 ''; | ||||
|               }; | ||||
|             } | ||||
|           ] | ||||
|           ++ (builtins.map (subdomain: { | ||||
|               ${subdomain} = { | ||||
|                 target = "http://localhost:${toString jellyfinPort}"; | ||||
|                 extraConfig = '' | ||||
|                   client_max_body_size 20M; | ||||
|                   add_header X-Content-Type-Options "nosniff"; | ||||
|                   add_header Content-Security-Policy "default-src https: data: blob: ; img-src 'self' https://* ; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' https://www.gstatic.com https://www.youtube.com blob:; worker-src 'self' blob:; connect-src 'self'; object-src 'none'; frame-ancestors 'self'; font-src 'self'"; | ||||
|                   add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), battery=(), bluetooth=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), keyboard-map=(), local-fonts=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=(), serial=(), sync-xhr=(), usb=(), xr-spatial-tracking=()" always; | ||||
| 
 | ||||
|                   proxy_set_header Host $host; | ||||
|                   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-Protocol $scheme; | ||||
|                   proxy_set_header X-Forwarded-Host $http_host; | ||||
| 
 | ||||
|                   proxy_buffering off; | ||||
|                 ''; | ||||
|               }; | ||||
|             }) | ||||
|             config.host.jellyfin.extraSubdomains)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue