update buckler middleware
This commit is contained in:
parent
3d71b50384
commit
52f4829f33
|
@ -24,8 +24,7 @@ async def buckler_session(request, handler):
|
||||||
'app_id': config.buckler['app_id'],
|
'app_id': config.buckler['app_id'],
|
||||||
'app_key': config.buckler['app_key'],
|
'app_key': config.buckler['app_key'],
|
||||||
'userid': user_id,
|
'userid': user_id,
|
||||||
'session': user_sid
|
'session': user_sid }
|
||||||
}
|
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.get(url, params=params) as resp:
|
async with session.get(url, params=params) as resp:
|
||||||
data = await resp.json()
|
data = await resp.json()
|
||||||
|
@ -34,6 +33,7 @@ async def buckler_session(request, handler):
|
||||||
resp.set_cookie(
|
resp.set_cookie(
|
||||||
'redirect',
|
'redirect',
|
||||||
request.url,
|
request.url,
|
||||||
|
domain=config.server_domain,
|
||||||
secure=True,
|
secure=True,
|
||||||
httponly=True)
|
httponly=True)
|
||||||
#samesite='strict')
|
#samesite='strict')
|
||||||
|
@ -55,6 +55,7 @@ async def buckler_session(request, handler):
|
||||||
resp.set_cookie(
|
resp.set_cookie(
|
||||||
'userid',
|
'userid',
|
||||||
user_id,
|
user_id,
|
||||||
|
domain=config.server_domain,
|
||||||
max_age=30*24*60*60,
|
max_age=30*24*60*60,
|
||||||
secure=True,
|
secure=True,
|
||||||
httponly=True)
|
httponly=True)
|
||||||
|
@ -62,6 +63,7 @@ async def buckler_session(request, handler):
|
||||||
resp.set_cookie(
|
resp.set_cookie(
|
||||||
'session',
|
'session',
|
||||||
user_sid,
|
user_sid,
|
||||||
|
domain=config.server_domain,
|
||||||
max_age=30*24*60*60,
|
max_age=30*24*60*60,
|
||||||
secure=True,
|
secure=True,
|
||||||
httponly=True)
|
httponly=True)
|
||||||
|
|
|
@ -7,7 +7,8 @@ rtorrents = [
|
||||||
'scgi://localhost:5001',
|
'scgi://localhost:5001',
|
||||||
]
|
]
|
||||||
|
|
||||||
prefix = '/aberrant'
|
server_domain = 'steelbea.me'
|
||||||
|
url_prefix = '/aberrant'
|
||||||
buckler = {
|
buckler = {
|
||||||
'url': "http://192.168.1.100:5400/buckler",
|
'url': "http://192.168.1.100:5400/buckler",
|
||||||
'app_id': 1,
|
'app_id': 1,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user