mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							21 lines
						
					
					
						
							480 B
						
					
					
				
			
		
		
	
	
							21 lines
						
					
					
						
							480 B
						
					
					
				| # frozen_string_literal: true
 | |
| 
 | |
| module Docuseal
 | |
|   DEFAULT_APP_URL = 'http://localhost:3000'
 | |
| 
 | |
|   module_function
 | |
| 
 | |
|   def default_url_options
 | |
|     @default_url_options ||= begin
 | |
|       value = EncryptedConfig.find_by(key: EncryptedConfig::APP_URL_KEY)&.value
 | |
|       value ||= DEFAULT_APP_URL
 | |
|       url = Addressable::URI.parse(value)
 | |
|       { host: url.host, port: url.port, protocol: url.scheme }
 | |
|     end
 | |
|   end
 | |
| 
 | |
|   def refresh_default_url_options!
 | |
|     @default_url_options = nil
 | |
|   end
 | |
| end
 |