From 5b46d970704ff4f574e6f867599a7df413fd5c5b Mon Sep 17 00:00:00 2001 From: fauno Date: Mon, 22 Jun 2020 12:34:15 -0300 Subject: [PATCH] Generar URLs incluyendo el host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Son necesarias para que Telegram pueda configurar los webhooks tambiƩn. --- config/deploy.rb | 3 ++- config/environments/production.rb | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/deploy.rb b/config/deploy.rb index cca79d9..16ad184 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -16,7 +16,8 @@ set :default_env, rails_env: 'production', rails_master_key: ENV.fetch('RAILS_MASTER_KEY') { File.read('config/master.key') }, web_concurrency: '1', - ld_preload: '/usr/lib/libjemalloc.so' + ld_preload: '/usr/lib/libjemalloc.so', + api_host: 'api.lumi.partidopirata.com.ar' after 'deploy:published', 'pumx:stop' after 'pumx:stop', 'pumx:start' diff --git a/config/environments/production.rb b/config/environments/production.rb index b83734d..411b77e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true +Rails.application.routes.default_url_options[:host] = ENV.fetch('API_HOST', 'api.lumi.partidopirata.com.ar') +Rails.application.routes.default_url_options[:protocol] = 'https' + Rails.application.configure do # Settings specified here will take precedence over those in # config/application.rb.