demo-site avatar

demo-site

Pricing

Pay per usage

Go to Apify Store
demo-site

demo-site

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Nishad Manerikar

Nishad Manerikar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

9 days ago

Last modified

Categories

Features

Limited permissionsMulti-tenantServer interface

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

  1. Open the Actor's standby URL in a browser with ?token=<your API token>.
  2. The address bar loses the token after one redirect; the probe shows search: "" and cookie: "".
  3. DevTools → Application → Cookies shows apify_standby_token_session, HttpOnly, expiring about 15 minutes out. Each click on a nav link moves the expiry forward.
  4. The same-origin fetch reports cookieSeenByActor: null and your user ID: the Actor is authenticated as you but never receives the cookie.
  5. 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.
  6. Delete the session cookie, or wait 15 minutes idle, and the next click returns a 401.

No dependencies; plain node:http.