demo-site
Pricing
Pay per usage
demo-site
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Nishad Manerikar
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
9 days ago
Last modified
Categories
Features
Share
Demo Site (token session test)
A Standby Actor that serves a small website: Home, About and Contact pages linked from a nav bar, plus /api, which returns JSON. It exists to try the token-session cookie by hand (apify/apify-core#30860): a browser navigation with ?token= gets the token swapped for a short-lived, HttpOnly cookie and is redirected to the same URL without it.
Every HTML page shows what its JavaScript can see: location.href, location.search, document.cookie, and the result of a same-origin fetch('/api'), which reports the cookie header the Actor received and the caller's X-Apify-User-ID.
How to use
- Open the Actor's standby URL in a browser with
?token=<your API token>. - The address bar loses the token after one redirect; the probe shows
search: ""andcookie: "". - DevTools → Application → Cookies shows
apify_standby_token_session, HttpOnly, expiring about 15 minutes out. Each click on a nav link moves the expiry forward. - The same-origin fetch reports
cookieSeenByActor: nulland your user ID: the Actor is authenticated as you but never receives the cookie. - Contact sets the Actor's own cookie
demo_actor=1; the probe can read that one, and it survives next to the controller's cookie. - Delete the session cookie, or wait 15 minutes idle, and the next click returns a 401.
No dependencies; plain node:http.