mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	add enable always https
This commit is contained in:
		
							parent
							
								
									b330146c73
								
							
						
					
					
						commit
						5424e688fb
					
				| @ -96,6 +96,7 @@ this is our config file,you can change stuff here | ||||
|     tubeApi: "https://api.poketube.fun/api/", | ||||
|     invapi: "https://invidious.sethforprivacy.com/api/v1", | ||||
|     dislikes: "https://returnyoutubedislikeapi.com/votes?videoId=", | ||||
|     enablealwayshttps: true, //enables always https on the server
 | ||||
|     t_url: "https://t.poketube.fun/", //  def matomo url
 | ||||
|   }; | ||||
| 
 | ||||
| @ -111,8 +112,12 @@ this is our config file,you can change stuff here | ||||
|   }); | ||||
| 
 | ||||
|   app.use(function (request, response, next) { | ||||
|     if (process.env.NODE_ENV != "development" && !request.secure) { | ||||
|       return response.redirect("https://" + request.headers.host + request.url); | ||||
|     if (config.enablealwayshttps == true) { | ||||
|       if (process.env.NODE_ENV != "development" && !request.secure) { | ||||
|         return response.redirect( | ||||
|           "https://" + request.headers.host + request.url | ||||
|         ); | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     next(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley