mirror of
https://github.com/chubin/wttr.in.git
synced 2024-10-05 01:42:07 +02:00
User-Agent can be omited
This commit is contained in:
parent
ef3cb4dd7c
commit
8e1479f6ba
@ -322,7 +322,7 @@ def send_malformed():
|
||||
@app.route("/<string:location>")
|
||||
def wttr(location = None):
|
||||
|
||||
user_agent = request.headers.get('User-Agent').lower()
|
||||
user_agent = request.headers.get('User-Agent', '').lower()
|
||||
|
||||
if any(agent in user_agent for agent in PLAIN_TEXT_AGENTS):
|
||||
html_output = False
|
||||
|
Loading…
Reference in New Issue
Block a user