mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
add the app url input on the first setup page
This commit is contained in:
1 parent
4977ee429c
commit
0ac30a5fc0
14 files changed
+93
-11
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# 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
|
||||
Reference in new issue
Block a user