mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			643 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			643 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
Tea.context(function () {
 | 
						|
	this.hasHTTPS = false
 | 
						|
	this.grpcAddrs = []
 | 
						|
	this.restAddrs = []
 | 
						|
 | 
						|
	this.changeListens = function (addrs) {
 | 
						|
		this.grpcAddrs = addrs
 | 
						|
 | 
						|
		this.hasHTTPS = this.grpcAddrs.$any(function (k, v) {
 | 
						|
			return v.protocol == "https"
 | 
						|
		}) || (this.restIsOn && this.restAddrs.$any(function (k, v) {
 | 
						|
			return v.protocol == "https"
 | 
						|
		}))
 | 
						|
	}
 | 
						|
 | 
						|
	this.changeRestListens = function (addrs) {
 | 
						|
		this.restAddrs = addrs
 | 
						|
 | 
						|
		this.hasHTTPS = this.grpcAddrs.$any(function (k, v) {
 | 
						|
			return v.protocol == "https"
 | 
						|
		}) || (this.restIsOn && this.restAddrs.$any(function (k, v) {
 | 
						|
			return v.protocol == "https"
 | 
						|
		}))
 | 
						|
	}
 | 
						|
 | 
						|
	this.restIsOn = false
 | 
						|
}) |