From 76183344bc6c96a38220313db9378e1ff0785f7c Mon Sep 17 00:00:00 2001 From: yystopf Date: Fri, 8 Oct 2021 14:04:13 +0800 Subject: [PATCH] fix: main content_type --- app/controllers/main_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 7b7468f93..afe767897 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -23,9 +23,9 @@ class MainController < ApplicationController # TODO: 这块之后需要整合,者架构重新变化,统一跳转到index后再路由分发 if params[:path] && params[:path]&.include?("h5educoderbuild") && params[:path].split("/").first == "h5educoderbuild" - render file: 'public/h5educoderbuild/index.html', :layout => false + render file: 'public/h5educoderbuild/index.html', :layout => false, :content_type=> 'text/html' else - render file: 'public/react/build/index.html', :layout => false + render file: 'public/react/build/index.html', :layout => false, :content_type=> 'text/html' end end