thomasht86 commited on
Commit
756286d
·
verified ·
1 Parent(s): 804355f

deploy at 2024-08-25 15:47:18.625683

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -184,7 +184,7 @@ middlewares = [
184
  SessionMiddleware,
185
  secret_key=SECRET_KEY,
186
  max_age=3600,
187
- same_site='lax', # Try 'Lax' if 'None' doesn't work
188
  https_only=True, # Set to True if your site uses HTTPS
189
  ),
190
  ]
@@ -205,7 +205,7 @@ app, rt = fast_app(
205
  hdrs=headers,
206
  middleware=middlewares,
207
  key_fname=sess_key_path,
208
- samesite="lax"
209
  )
210
 
211
  # Add this function for debugging
@@ -452,7 +452,7 @@ async def login(request: Request):
452
  request.session,
453
  max_age=3600,
454
  httponly=False,
455
- samesite='lax', # Try 'lax' if 'none' doesn't work
456
  secure=True, # Set to True if your site uses HTTPS
457
  )
458
  return response
 
184
  SessionMiddleware,
185
  secret_key=SECRET_KEY,
186
  max_age=3600,
187
+ same_site='None', # Try 'Lax' if 'None' doesn't work
188
  https_only=True, # Set to True if your site uses HTTPS
189
  ),
190
  ]
 
205
  hdrs=headers,
206
  middleware=middlewares,
207
  key_fname=sess_key_path,
208
+ samesite="none"
209
  )
210
 
211
  # Add this function for debugging
 
452
  request.session,
453
  max_age=3600,
454
  httponly=False,
455
+ samesite='None', # Try 'lax' if 'none' doesn't work
456
  secure=True, # Set to True if your site uses HTTPS
457
  )
458
  return response