Skip to content

Commit

Permalink
Update appserver.py
Browse files Browse the repository at this point in the history
better handle cookies/authent/session whein in a iframe
  • Loading branch information
manatlan committed Mar 29, 2024
1 parent bbb6089 commit 8038734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htagweb/appserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, app:ASGIApp, https_only:bool = False, sesprovider:"async meth
self.session_cookie = "session"
self.max_age = 0
self.path = "/"
self.security_flags = "httponly; samesite=lax"
self.security_flags = "httponly; samesite=none"
if https_only: # Secure flag can be used with HTTPS only
self.security_flags += "; secure"
self.cbsesprovider=sesprovider
Expand Down Expand Up @@ -262,7 +262,7 @@ async def handle(self, request,
async function interact( o ) {
let body = await _write_(JSON.stringify(o));
let req=await window.fetch("/_/%(fqn)s%(pparano)s",{method:"POST", body: body});
let req=await window.fetch("/_/%(fqn)s%(pparano)s",{method:"POST", body: body, mode: 'cors', credentials: 'include', referrerPolicy: "origin"});
let actions=await req.text();
action( await _read_(actions) );
}
Expand Down

0 comments on commit 8038734

Please sign in to comment.