Skip to content

Commit

Permalink
add app url var
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed Aug 25, 2024
1 parent b6f3076 commit 5684baf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/docuseal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Docuseal
NEWSLETTER_URL = "#{PRODUCT_URL}/newsletters".freeze
ENQUIRIES_URL = "#{PRODUCT_URL}/enquiries".freeze
PRODUCT_NAME = 'DocuSeal'
DEFAULT_APP_URL = 'http://localhost:3000'
DEFAULT_APP_URL = ENV.fetch('APP_URL', 'http://localhost:3000')
GITHUB_URL = 'https://github.com/docusealco/docuseal'
DISCORD_URL = 'https://discord.gg/qygYCDGck9'
TWITTER_URL = 'https://twitter.com/docusealco'
Expand Down Expand Up @@ -76,7 +76,7 @@ def default_url_options
return DEFAULT_URL_OPTIONS if multitenant?

@default_url_options ||= begin
value = EncryptedConfig.find_by(key: EncryptedConfig::APP_URL_KEY)&.value
value = EncryptedConfig.find_by(key: EncryptedConfig::APP_URL_KEY)&.value if ENV['APP_URL'].blank?
value ||= DEFAULT_APP_URL
url = Addressable::URI.parse(value)
{ host: url.host, port: url.port, protocol: url.scheme }
Expand Down

0 comments on commit 5684baf

Please sign in to comment.