mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ build
|
||||
node_modules
|
||||
client
|
||||
test.php
|
||||
main.html
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user