Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from netlogix/feature/update-flow-4
Browse files Browse the repository at this point in the history
Feature/update flow 4
  • Loading branch information
paxuclus authored Nov 17, 2017
2 parents 218d733 + b75366c commit 72cd7df
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 28 deletions.
8 changes: 4 additions & 4 deletions Classes/Netlogix/Cors/Http/Component/CorsComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* */

use Netlogix\Cors\Service\CorsService;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Http\Component\ComponentContext;
use TYPO3\Flow\Http\Component\ComponentInterface;
use TYPO3\Flow\Utility\Arrays;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Http\Component\ComponentContext;
use Neos\Flow\Http\Component\ComponentInterface;
use Neos\Utility\Arrays;

/**
* HTTP component sending CORS (Access-Control-Allow-*) headers.
Expand Down
8 changes: 4 additions & 4 deletions Classes/Netlogix/Cors/Service/CorsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* *
* */

use TYPO3\Flow\Core\Bootstrap;
use TYPO3\Flow\Http\Request;
use TYPO3\Flow\Security\Exception\AccessDeniedException;
use Neos\Flow\Core\Bootstrap;
use Neos\Flow\Http\Request;
use Neos\Flow\Security\Exception\AccessDeniedException;

/**
* Cross Origin Resource Sharing (CORS) service
Expand Down Expand Up @@ -203,7 +203,7 @@ protected function isCurrentRequestAllowed()
/**
* Deny request and send forbidden header
*
* @throws \TYPO3\Flow\Http\Exception
* @throws \Neos\Flow\Http\Exception
*/
protected function denyRequest()
{
Expand Down
19 changes: 9 additions & 10 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@
# instead. #
# #

TYPO3:

Neos:
Flow:

http:
chain:
preprocess:
chain:
'cors':
position: 'start'
component: 'Netlogix\Cors\Http\Component\CorsComponent'
cors:
position: start
component: Netlogix\Cors\Http\Component\CorsComponent
componentOptions:
allowedMethods: ['GET']
allowedOrigins: []
allowedHeaders: []
allowCredentials: FALSE
allowedMethods:
- GET
allowedOrigins: { }
allowedHeaders: { }
allowCredentials: false
49 changes: 39 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,42 @@
{
"name": "netlogix/cors",
"type": "typo3-flow-package",
"description": "Handle CORS requests, basically ported from EXT:nxcors",
"require": {
"typo3/flow": "*"
},
"autoload": {
"psr-0": {
"Netlogix\\Cors": "Classes"
"name": "netlogix/cors",
"type": "neos-package",
"description": "Handle CORS requests, basically ported from EXT:nxcors",
"require": {
"neos/flow": "~4.0.0"
},
"autoload": {
"psr-0": {
"Netlogix\\Cors": "Classes"
}
},
"extra": {
"applied-flow-migrations": [
"TYPO3.FLOW3-201201261636",
"TYPO3.Fluid-201205031303",
"TYPO3.FLOW3-201205292145",
"TYPO3.FLOW3-201206271128",
"TYPO3.FLOW3-201209201112",
"TYPO3.Flow-201209251426",
"TYPO3.Flow-201211151101",
"TYPO3.Flow-201212051340",
"TYPO3.Flow-201310031523",
"TYPO3.Flow-201405111147",
"TYPO3.Fluid-20141113120800",
"TYPO3.Flow-20141113121400",
"TYPO3.Fluid-20141121091700",
"TYPO3.Fluid-20150214130800",
"TYPO3.Flow-20151113161300",
"TYPO3.Flow-20161115140400",
"TYPO3.Flow-20161115140430",
"Neos.Flow-20161124204700",
"Neos.Flow-20161124204701",
"Neos.Flow-20161124224015",
"Neos.Eel-20161124230101",
"Neos.Flow-20161125124112",
"TYPO3.FluidAdaptor-20161130112935",
"Neos.Flow-20170125103800",
"Neos.Flow-20170127183102"
]
}
}
}

0 comments on commit 72cd7df

Please sign in to comment.