Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend

This commit is contained in:
Yuri Kuznetsov
2014-03-17 11:39:50 +02:00
3 changed files with 17 additions and 3 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ build
node_modules
client
test.php
main.html

View File

@@ -1,4 +1,4 @@
<?php
<?php
/************************************************************************
* This file is part of EspoCRM.
*
@@ -195,6 +195,12 @@ class Application
$this->getSlim()->hook('slim.after.router', function () use (&$slim) {
$slim->contentType('application/json');
$res = $slim->response();
$res->header('Expires', '0');
$res->header('Last-Modified', gmdate("D, d M Y H:i:s") . " GMT");
$res->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
$res->header('Pragma', 'no-cache');
});
}

View File

@@ -1,4 +1,4 @@
<?php
<?php
/************************************************************************
* This file is part of EspoCRM.
*
@@ -66,7 +66,14 @@ class Auth extends \Slim\Middleware
}
$authKey = $req->headers('PHP_AUTH_USER');
$authSec = $req->headers('PHP_AUTH_PW');
$authSec = $req->headers('PHP_AUTH_PW');
$espoAuth = $req->headers('HTTP_ESPO_AUTHORIZATION');
if (isset($espoAuth)) {
$credentials = explode(':', base64_decode($espoAuth));
$authKey = $credentials[0];
$authSec = $credentials[1];
}
if ($authKey && $authSec) {
$isAuthenticated = false;