Skip to content

Commit 8b587fc

Browse files
committed
update check origin
1 parent 33bdffe commit 8b587fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

teach/learning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def application(environ, start_response):
8383
code = qs['code'][0]
8484
headers = [('Content-Type', 'application/json')]
8585
origin = environ.get('HTTP_ORIGIN', '')
86-
if origin.find('www.liaoxuefeng.com') == -1:
86+
if origin.find('.liaoxuefeng.com') == -1:
8787
start_response('400 Bad Request', [('Content-Type', 'application/json')])
8888
return [b'{"error":"invalid_origin"}']
8989
headers.append(('Access-Control-Allow-Origin', origin))

0 commit comments

Comments
 (0)