mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-30 18:47:51 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			195 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			195 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require 'uri'
 | |
| module UrlHelper
 | |
|   def url_valid?(url)
 | |
|     url = begin
 | |
|       URI.parse(url)
 | |
|     rescue StandardError
 | |
|       false
 | |
|     end
 | |
|     url.is_a?(URI::HTTP) || url.is_a?(URI::HTTPS)
 | |
|   end
 | |
| end
 | 
