1
0
mirror of https://git.sr.ht/~cadence/NewLeaf synced 2024-11-14 12:07:30 +00:00

Fix ggpht response call order

This commit is contained in:
Cadence Ember 2021-01-20 17:33:03 +13:00
parent 39425f994a
commit 985f0c1c32
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17

View File

@ -101,8 +101,8 @@ class Second(object):
@cherrypy.expose
def ggpht(self, *path):
with requests.get("https://yt3.ggpht.com/{}".format("/".join(path))) as r:
cherrypy.response.headers["content-type"] = r.headers["content-type"]
r.raise_for_status()
cherrypy.response.headers["content-type"] = r.headers["content-type"]
return r
cherrypy.config.update({"server.socket_port": 3000, "server.socket_host": "0.0.0.0"})