rabin 7 年之前
父节点
当前提交
ceea0f05c6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      web.py

+ 4 - 1
web.py

@@ -250,12 +250,15 @@ class Web(object):
 	@staticmethod
 	def start(url):
 		config = Demeter.config[Demeter.web]
+		cookie = True
+		if 'xsrf_cookies' in config:
+			cookie = Demeter.bool(config['xsrf_cookies'])
 		settings = {
 			"static_path": Demeter.webPath + 'static',
 			"template_path": Demeter.webPath + 'templates',
 			"cookie_secret": "61oETzKXQAGaYekL5gEmGeJJFuYh7EQnp2XdTP1o/Vo=",
 			"login_url": "/user/login",
-			"xsrf_cookies": True,
+			"xsrf_cookies": cookie,
 			"debug": Demeter.bool(config['debug']),
 			#"autoreload": Demeter.bool(config['autoreload']),
 			"port": config['port'],