Skip to content

Commit b516f05

Browse files
authored
Update README.md
Updating README adding no cache headers just in case of 302 response
1 parent 0bdaa90 commit b516f05

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@ the following method is all that is needed to validate that a user has been thro
6161
require_once( __DIR__ .'Models.php');
6262
require_once( __DIR__ .'KnownUser.php');
6363

64-
//Adding no cache headers to prevent browsers to cache requests
65-
header("Expires:Fri, 01 Jan 1990 00:00:00 GMT");
66-
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
67-
header("Pragma: no-cache");
68-
//end
64+
6965

7066
$configText = file_get_contents('integrationconfig.json');
7167
$customerID = ""; //Your Queue-it customer ID
@@ -83,6 +79,12 @@ try
8379

8480
if($result->doRedirect())
8581
{
82+
//Adding no cache headers to prevent browsers to cache requests
83+
header("Expires:Fri, 01 Jan 1990 00:00:00 GMT");
84+
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
85+
header("Pragma: no-cache");
86+
//end
87+
8688
//Send the user to the queue - either becuase hash was missing or becuase is was invalid
8789
header('Location: '.$result->redirectUrl);
8890
die();
@@ -140,11 +142,7 @@ The following is an example of how to specify the configuration in code:
140142
require_once( __DIR__ .'Models.php');
141143
require_once( __DIR__ .'KnownUser.php');
142144

143-
//Adding no cache headers to prevent browsers to cache requests
144-
header("Expires:Fri, 01 Jan 1990 00:00:00 GMT");
145-
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
146-
header("Pragma: no-cache");
147-
//end
145+
148146

149147
$customerID = ""; //Your Queue-it customer ID
150148
$secretKey = ""; //Your 72 char secrete key as specified in Go Queue-it self-service platform
@@ -169,6 +167,11 @@ try
169167

170168
if($result->doRedirect())
171169
{
170+
//Adding no cache headers to prevent browsers to cache requests
171+
header("Expires:Fri, 01 Jan 1990 00:00:00 GMT");
172+
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
173+
header("Pragma: no-cache");
174+
//end
172175
//Send the user to the queue - either becuase hash was missing or becuase is was invalid
173176
header('Location: '.$result->redirectUrl);
174177
die();

0 commit comments

Comments
 (0)