Line | |
---|
1 | <?php |
---|
2 | // Le traffic HTTP est redirige en HTTPS quand l'utilisateur est connecte ou pour la page de login |
---|
3 | // a noter: il faut avoir applique le patch: https://core.spip.net/projects/spip/repository/revisions/17941 |
---|
4 | // -> dans le core depuis la version 2.1.11 |
---|
5 | if ( |
---|
6 | ( |
---|
7 | ($_COOKIE['spip_session']) OR |
---|
8 | (strpos($_SERVER['REQUEST_URI'], '/spip.php?page=login')===0) |
---|
9 | ) AND |
---|
10 | (!$_SERVER['HTTPS']) AND |
---|
11 | ($_SERVER['REQUEST_METHOD'] == 'GET') |
---|
12 | ) { |
---|
13 | include_spip('inc/headers'); |
---|
14 | redirige_par_entete('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); |
---|
15 | } |
---|
16 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.