Merge pull request #17986 from seamuslee001/dev_core_1913_alternate
[civicrm-core.git] / extern / rest.php
... / ...
CommitLineData
1<?php
2/*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12require_once '../civicrm.config.php';
13CRM_Core_Config::singleton();
14
15if (defined('PANTHEON_ENVIRONMENT')) {
16 ini_set('session.save_handler', 'files');
17}
18$rest = new CRM_Utils_REST();
19
20// Json-appropriate header will be set by CRM_Utils_Rest
21// But we need to set header here for non-json
22if (empty($_GET['json'])) {
23 header('Content-Type: text/xml');
24}
25echo $rest->bootAndRun();