From 008ba4fb076b5ab0498dd5158aefd8668b61d71e Mon Sep 17 00:00:00 2001 From: wurong <1667629529@qq.com> Date: Fri, 31 May 2019 16:38:18 +0800 Subject: [PATCH] =?UTF-8?q?http=20only=20=E5=BC=80=E5=90=AF=20=E5=9C=A8Bas?= =?UTF-8?q?e=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/Base.php | 4 +++- app/web/view/pc/test/index.html | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/common/Base.php b/app/common/Base.php index 1dae38b..f083ec8 100644 --- a/app/common/Base.php +++ b/app/common/Base.php @@ -23,7 +23,7 @@ class Base extends Controller{ public $is_admin=false; public $last_sign_time; public $have_contest=0; - function __construct(\think\Request $request = null) { + function __construct(\think\Request $request = null) { parent::__construct($request); if(config('app_debug')==false){ $nowurl=request()->domain(); @@ -31,6 +31,8 @@ class Base extends Controller{ $this->redirect(config('web_domain')); } } + //header("Set-Cookie:HttpOnly;"); + ini_set("session.cookie_httponly", 1); isset($_SESSION) OR session_start(); //if(request()->isMobile()) $this->view->config('view_path','../app/web/view/pc/'); diff --git a/app/web/view/pc/test/index.html b/app/web/view/pc/test/index.html index 7b29693..51b76d2 100644 --- a/app/web/view/pc/test/index.html +++ b/app/web/view/pc/test/index.html @@ -4,8 +4,13 @@
test - ++ +
+