setCookies.php 455 B

12345678910111213141516
  1. <?php
  2. /**
  3. * This script will set cookies for the websites with a custom domain (not in '.opentalent.fr')
  4. *
  5. * NB: It is voluntarily kept separated from typo3, in order to stay as light as possible,
  6. * because it will be called from the Opentalent front app.
  7. */
  8. if (
  9. preg_match("/https?:\/\/(.*\.)?opentalent.fr(\/.*)?/", $_SERVER['HTTP_REFERER'])
  10. && isset($_REQUEST['BEARER'])
  11. )
  12. {
  13. setcookie('BEARER', $_REQUEST['BEARER'], 0, "/");
  14. }