Merge pull request #64 from guewen/add-iframely-sneaky-user-agent
Add Iframely in sneaky user-agents
This commit is contained in:
commit
2fcfc6b8f1
2 changed files with 4 additions and 2 deletions
|
@ -10,7 +10,8 @@ from flask import abort, Flask, render_template, request
|
||||||
|
|
||||||
|
|
||||||
SNEAKY_USER_AGENTS = ('Slackbot', 'facebookexternalhit', 'Twitterbot',
|
SNEAKY_USER_AGENTS = ('Slackbot', 'facebookexternalhit', 'Twitterbot',
|
||||||
'Facebot', 'WhatsApp', 'SkypeUriPreview')
|
'Facebot', 'WhatsApp', 'SkypeUriPreview',
|
||||||
|
'Iframely')
|
||||||
SNEAKY_USER_AGENTS_RE = re.compile('|'.join(SNEAKY_USER_AGENTS))
|
SNEAKY_USER_AGENTS_RE = re.compile('|'.join(SNEAKY_USER_AGENTS))
|
||||||
NO_SSL = os.environ.get('NO_SSL', False)
|
NO_SSL = os.environ.get('NO_SSL', False)
|
||||||
|
|
||||||
|
|
3
tests.py
3
tests.py
|
@ -86,7 +86,8 @@ class SnapPassRoutesTestCase(TestCase):
|
||||||
"Twitterbot/1.0",
|
"Twitterbot/1.0",
|
||||||
"_WhatsApp/2.12.81 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00",
|
"_WhatsApp/2.12.81 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00",
|
||||||
"WhatsApp/2.16.6/i",
|
"WhatsApp/2.16.6/i",
|
||||||
"SkypeUriPreview Preview/0.5"
|
"SkypeUriPreview Preview/0.5",
|
||||||
|
"Iframely/0.8.5 (+http://iframely.com/;)",
|
||||||
]
|
]
|
||||||
|
|
||||||
for ua in a_few_sneaky_bots:
|
for ua in a_few_sneaky_bots:
|
||||||
|
|
Loading…
Reference in a new issue