[fix] valid https checking
This commit is contained in:
		
							parent
							
								
									d1e8c2365e
								
							
						
					
					
						commit
						c838492d6d
					
				| @ -119,7 +119,7 @@ def opensearch(): | |||||||
|     # chrome/chromium only supports HTTP GET.... |     # chrome/chromium only supports HTTP GET.... | ||||||
|     if request.headers.get('User-Agent', '').lower().find('webkit') >= 0: |     if request.headers.get('User-Agent', '').lower().find('webkit') >= 0: | ||||||
|         method = 'get' |         method = 'get' | ||||||
|     if request.headers.get('Host', '').find('https://'): |     if request.is_secure: | ||||||
|         scheme = 'https' |         scheme = 'https' | ||||||
|     ret = opensearch_xml.format(method=method, host=url_for('index', _external=True, _scheme=scheme)) |     ret = opensearch_xml.format(method=method, host=url_for('index', _external=True, _scheme=scheme)) | ||||||
|     resp = Response(response=ret, |     resp = Response(response=ret, | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user