Skip to content

Commit 89ced2c

Browse files
author
Jonatan Frank
committed
Categories Endpoints
1 parent d5d952f commit 89ced2c

38 files changed

+289
-757
lines changed

app/AppKernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public function registerBundles()
1818
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
1919
new AppBundle\AppBundle(),
2020
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
21+
new Nelmio\CorsBundle\NelmioCorsBundle(),
2122
);
2223

2324
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
2425
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
25-
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
2626
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
2727
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
2828
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();

app/config/config.yml

+18
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,21 @@ swiftmailer:
7171
username: "%mailer_user%"
7272
password: "%mailer_password%"
7373
spool: { type: memory }
74+
75+
#CORS configuration
76+
nelmio_cors:
77+
defaults:
78+
allow_credentials: false
79+
allow_origin: []
80+
allow_headers: []
81+
allow_methods: []
82+
expose_headers: []
83+
max_age: 0
84+
hosts: []
85+
origin_regex: false
86+
paths:
87+
'^/':
88+
allow_origin: ['*']
89+
allow_headers: ['*']
90+
allow_methods: ['POST', 'GET', 'PUT', 'DELETE']
91+
max_age: 3600

app/config/routing_dev.yml

-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,3 @@ _errors:
1616

1717
_main:
1818
resource: routing.yml
19-
20-
# AcmeDemoBundle routes (to be removed)
21-
_acme_demo:
22-
resource: "@AcmeDemoBundle/Resources/config/routing.yml"

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
2323
"incenteev/composer-parameter-handler": "~2.0",
2424
"doctrine/migrations": "1.0.*@dev",
25-
"doctrine/doctrine-migrations-bundle": "2.1.*@dev"
25+
"doctrine/doctrine-migrations-bundle": "2.1.*@dev",
26+
"nelmio/cors-bundle": "~1.4"
2627
},
2728
"require-dev": {
2829
"sensio/generator-bundle": "~2.3"

composer.lock

+56-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Acme/DemoBundle/AcmeDemoBundle.php

-9
This file was deleted.

src/Acme/DemoBundle/Command/HelloWorldCommand.php

-48
This file was deleted.

src/Acme/DemoBundle/Controller/DemoController.php

-56
This file was deleted.

src/Acme/DemoBundle/Controller/SecuredController.php

-70
This file was deleted.

src/Acme/DemoBundle/Controller/WelcomeController.php

-19
This file was deleted.

src/Acme/DemoBundle/DependencyInjection/AcmeDemoExtension.php

-22
This file was deleted.

src/Acme/DemoBundle/EventListener/ControllerListener.php

-24
This file was deleted.

0 commit comments

Comments
 (0)