From 76b40d012b063e937847836eda6fb9ca3a6494cb Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 9 Jul 2022 20:11:35 +0200 Subject: [PATCH] Respect app config when generating export URL --- lib/exporter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exporter.rb b/lib/exporter.rb index d2624b51..70b5b18b 100644 --- a/lib/exporter.rb +++ b/lib/exporter.rb @@ -134,7 +134,7 @@ class Exporter def publish `tar czvf #{Rails.root.join "public", "export", "#{@export_filename}.tar.gz"} -C /tmp/rs_export #{@export_dirname}` - url = "https://retrospring.net/export/#{@export_filename}" + url = "#{APP_CONFIG[:https] ? 'https' : 'http'}://#{APP_CONFIG[:hostname]}/export/#{@export_filename}" @user.export_processing = false @user.export_url = url @user.export_created_at = Time.now