Fix non default local CORS URL case
I cleaned up the CORSHandler code a bit more and also rewrote the helper to use the framework to access the request properly and took care of also grabbing the request schema from the server.
This commit is contained in:
parent
6e2cb2b2a8
commit
04e2402276
2 changed files with 30 additions and 5 deletions
|
@ -16,7 +16,7 @@ class Application_Form_Login extends Zend_Form
|
|||
if ($request) {
|
||||
$refererUrl = $request->getHeader('referer');
|
||||
$originIsSafe = false;
|
||||
foreach (CORSHelper::getAllowedOrigins() as $safeOrigin) {
|
||||
foreach (CORSHelper::getAllowedOrigins($request) as $safeOrigin) {
|
||||
if ($this->startsWith($safeOrigin, $refererUrl)) {
|
||||
$originIsSafe = true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue