Warn when assuming https
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									cf2c691585
								
							
						
					
					
						commit
						c8351e8f0c
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -80,7 +80,10 @@ class Form extends ElemJS {
 | 
				
			||||||
		let currentAddress = homeserver.value
 | 
							let currentAddress = homeserver.value
 | 
				
			||||||
		let ok = false
 | 
							let ok = false
 | 
				
			||||||
		while (!ok) {
 | 
							while (!ok) {
 | 
				
			||||||
			if (!currentAddress.match(/^https?:\/\//)) currentAddress = "https://" + currentAddress
 | 
								if (!currentAddress.match(/^https?:\/\//)) {
 | 
				
			||||||
 | 
									console.warn(`${currentAddress} doesn't specify the protocol, assuming https`)
 | 
				
			||||||
 | 
									currentAddress = "https://" + currentAddress
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
			currentAddress = currentAddress.replace(/\/*$/, "")
 | 
								currentAddress = currentAddress.replace(/\/*$/, "")
 | 
				
			||||||
			this.status(`Looking up homeserver... trying ${currentAddress}`)
 | 
								this.status(`Looking up homeserver... trying ${currentAddress}`)
 | 
				
			||||||
			try {
 | 
								try {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue