+ optional ssl for nginx
This commit is contained in:
		
							
								
								
									
										14
									
								
								config/nginx/includes.d/https.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								config/nginx/includes.d/https.conf
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,14 @@ | ||||
| error_page 419 = @https; | ||||
| set $is_https "0"; | ||||
| if ( $scheme ~* "^https") { | ||||
|     set $is_https "${is_https}1"; | ||||
| } | ||||
| if ( $request_uri ~* "api/v") { | ||||
|     set $is_https "${is_https}1"; | ||||
| } | ||||
| if ( $is_https = "0" ) { | ||||
|     return 419; | ||||
| } | ||||
| location @https { | ||||
|     rewrite ^ https://$http_host$request_uri permanent; | ||||
| } | ||||
							
								
								
									
										2
									
								
								config/nginx/ssl.d/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								config/nginx/ssl.d/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | ||||
| * | ||||
| !.gitignore | ||||
		Reference in New Issue
	
	Block a user