Skip to content

Commit

Permalink
update check origin
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelliao committed May 25, 2015
1 parent 33bdffe commit 8b587fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teach/learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def application(environ, start_response):
code = qs['code'][0]
headers = [('Content-Type', 'application/json')]
origin = environ.get('HTTP_ORIGIN', '')
if origin.find('www.liaoxuefeng.com') == -1:
if origin.find('.liaoxuefeng.com') == -1:
start_response('400 Bad Request', [('Content-Type', 'application/json')])
return [b'{"error":"invalid_origin"}']
headers.append(('Access-Control-Allow-Origin', origin))
Expand Down

0 comments on commit 8b587fc

Please sign in to comment.