From e2511a02692bff54553d6b628c563aaa4dbad67b Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 6 Mar 2017 11:46:37 +0900 Subject: [PATCH] Insert CSRF token using meta tag in common_layout.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 태그의 속성이나 그 밖의 태그를 사용하지 않는 이유는 가 로딩되기 전에 먼저 AJAX 요청을 시도하는 서드파티 자료가 있기 때문이다. 상단에 CSRF 토큰을 넣어야 이런 자료에서도 토큰이 누락되지 않는다. 다른 CSM나 프레임워크들도 상단에 태그를 사용하여 CSRF 토큰을 삽입하는 사례가 많으며, csrf-token은 이런 용도로 WHATWG에 공식적으로 등록된 meta name이다. cf. https://wiki.whatwg.org/wiki/MetaExtensions --- common/tpl/common_layout.html | 1 + 1 file changed, 1 insertion(+) diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html index e6350e4c2..4d12ec47a 100644 --- a/common/tpl/common_layout.html +++ b/common/tpl/common_layout.html @@ -10,6 +10,7 @@ + {Context::getBrowserTitle()}