User Tools

Site Tools


howto:cookieless-portal

Create a cookie-less portal

Configuration of HSMX

Browse to Layout → settings and disable Use cookie based sessions.

Modifications to Custom Portal

There are a few things that need to be changed when using a custom portal; Every URL has to contain the session id. Depending on whether the URL already contains HTTP GET variables append $sessionurl2 or $sessionurl1 to the hyperlink. Make sure to include or require initialize before using the variables: require_once($_SERVER['DOCUMENT_ROOT'] . “/hsm/include/initialize.php”);

  • <a href=“login.php”>Login</a> becomes <a href=“login.php<?=$sessionurl2?>”>Login</a>
  • <a href=“page.php?var=value”>Login</a> becomes <a href=“login.php?var=value<?=$sessionurl1?>”>Login</a>

Keep in mind that it's not just for hyperlinks, all possible paths (links) should be updated. This includes form elements and also redirections:

  • <form action=“login.php”> becomes <form action=“login.php<?=$sessionurl2?>”>
  • <form action=“login.php?update=true”> becomes <form action=“login.php?update=true<?=$sessionurl1?>”>
  • header(“Location: login.php”); becomes header(“Location: login.php”.$sessionurl2);
howto/cookieless-portal.txt · Last modified: 2021/06/03 14:40 (external edit)