There was an error while loading. Please reload this page.
2 parents ee0646c + 2858017 commit e2a0b14Copy full SHA for e2a0b14
src/Http/Handlers/UserInfoHandler.php
@@ -15,6 +15,19 @@ public function __construct( OAuth2Server $server ) {
15
}
16
17
public function handle( Request $request, Response $response ): Response {
18
-return $this->server->handleUserInfoRequest( $request );
+// prevent caching plugins from caching this page.
19
+if ( ! defined( 'DONOTCACHEPAGE' ) ) {
20
+define( 'DONOTCACHEPAGE', true );
21
+}
22
+
23
+$response = $this->server->handleUserInfoRequest( $request, $response );
24
+$response->addHttpHeaders(
25
+array(
26
+'Cache-Control' => 'no-store',
27
+'Pragma' => 'no-cache',
28
+)
29
+);
30
31
+return $response;
32
33
0 commit comments