From 0bfed83bc0cb08776c75b7bfe496cd329b03ace5 Mon Sep 17 00:00:00 2001 From: jasder Date: Tue, 22 Jun 2021 15:05:10 +0800 Subject: [PATCH] =?UTF-8?q?FIX=20=E8=A7=A3=E5=86=B3=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0base=20url=E5=AF=BC=E8=87=B4=E7=9A=84https?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- config/configuration.yml.example | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8b98a920b..7ef5879a2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -771,7 +771,7 @@ class ApplicationController < ActionController::Base end def base_url - request.base_url + Rails.application.config_for(:configuration)['platform_url'] || request.base_url end def convert_image! diff --git a/config/configuration.yml.example b/config/configuration.yml.example index b45c9532c..c8fe96ca2 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -1,6 +1,7 @@ default: &default # 用户登入的时候设置/登出的时候清空 autologin_cookie_name: 'autologin_trustie' + platform_url: 'http://localhost:3000' #附件上传路径