Javier Eguiluz 9 лет назад
Родитель
Сommit
c974b263be
3 измененных файлов с 81 добавлено и 13 удалено
  1. 13 0
      app/config/config.yml
  2. 2 1
      composer.json
  3. 66 12
      composer.lock

+ 13 - 0
app/config/config.yml

@@ -109,3 +109,16 @@ nelmio_solarium:
             port: %solr_port%
             path: %solr_path%
             core: %solr_core%
+
+nelmio_cors:
+    defaults:
+        allow_origin: ['*']
+        allow_headers: ['*']
+        max_age: 600
+    paths:
+        '^\/packages\/list\.json':
+            allow_methods: ['GET']
+        '^\/search\.json':
+            allow_methods: ['GET']
+        '^\/packages\/.*\/.*\.json':
+            allow_methods: ['GET']

+ 2 - 1
composer.json

@@ -51,7 +51,8 @@
         "zendframework/zend-version": "^2.0",
         "pagerfanta/pagerfanta": "^1.0",
         "knplabs/knp-menu-bundle": "^2.1",
-        "ezyang/htmlpurifier": "^4.6"
+        "ezyang/htmlpurifier": "^4.6",
+        "nelmio/cors-bundle": "^1.4"
     },
     "_": ["fos user bundle 2.0.0 tag needed"],
     "require-dev": {

+ 66 - 12
composer.lock

@@ -4,8 +4,8 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "e0516c12a47fb02ae5764555971e633d",
-    "content-hash": "af1ee5453260327a4332ad266f9ec95e",
+    "hash": "23937ff93c496c2bf613b6a14b6c4d1c",
+    "content-hash": "cc73d914372ea327a545470ab6886a43",
     "packages": [
         {
             "name": "composer/composer",
@@ -17,7 +17,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/composer/zipball/7e1a23eef7b2c0aeecdd4c70eda53d39265cf7a6",
+                "url": "https://api.github.com/repos/composer/composer/zipball/7c62e2b5346a6a656dd9587203719e35bb768056",
                 "reference": "7e1a23eef7b2c0aeecdd4c70eda53d39265cf7a6",
                 "shasum": ""
             },
@@ -1052,7 +1052,7 @@
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/a39d000577d735444bee97de9f5ee382e3f85fa1",
+                "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/16b04c49af05dd3fb381e4abe04f0e5e231ac76d",
                 "reference": "a39d000577d735444bee97de9f5ee382e3f85fa1",
                 "shasum": ""
             },
@@ -1982,6 +1982,63 @@
             ],
             "time": "2015-10-14 12:51:02"
         },
+        {
+            "name": "nelmio/cors-bundle",
+            "version": "1.4.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/nelmio/NelmioCorsBundle.git",
+                "reference": "fa14a81737c605bf4766054cdcb72a16a433d537"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/fa14a81737c605bf4766054cdcb72a16a433d537",
+                "reference": "fa14a81737c605bf4766054cdcb72a16a433d537",
+                "shasum": ""
+            },
+            "require": {
+                "symfony/framework-bundle": "^2.2 || ^3.0"
+            },
+            "require-dev": {
+                "matthiasnoback/symfony-dependency-injection-test": "^0.7.6",
+                "mockery/mockery": "0.9.*"
+            },
+            "type": "symfony-bundle",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Nelmio\\CorsBundle\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nelmio",
+                    "homepage": "http://nelm.io"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://github.com/nelmio/NelmioCorsBundle/contributors"
+                }
+            ],
+            "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony2 application",
+            "keywords": [
+                "api",
+                "cors",
+                "crossdomain"
+            ],
+            "time": "2015-12-09 17:26:34"
+        },
         {
             "name": "nelmio/security-bundle",
             "version": "1.10.0",
@@ -2906,16 +2963,16 @@
         },
         {
             "name": "symfony/polyfill-apcu",
-            "version": "v1.1.0",
+            "version": "v1.1.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-apcu.git",
-                "reference": "d1911e6caeb4b6a4c8e2d5c46b978a66b3745e4c"
+                "reference": "0c901e4e65a2f7ece68f0fd249b56d6ad3adc214"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/d1911e6caeb4b6a4c8e2d5c46b978a66b3745e4c",
-                "reference": "d1911e6caeb4b6a4c8e2d5c46b978a66b3745e4c",
+                "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/0c901e4e65a2f7ece68f0fd249b56d6ad3adc214",
+                "reference": "0c901e4e65a2f7ece68f0fd249b56d6ad3adc214",
                 "shasum": ""
             },
             "require": {
@@ -2930,9 +2987,6 @@
             "autoload": {
                 "files": [
                     "bootstrap.php"
-                ],
-                "classmap": [
-                    "Resources/stubs"
                 ]
             },
             "notification-url": "https://packagist.org/downloads/",
@@ -2958,7 +3012,7 @@
                 "portable",
                 "shim"
             ],
-            "time": "2016-01-20 09:13:37"
+            "time": "2016-03-03 16:49:40"
         },
         {
             "name": "symfony/polyfill-intl-icu",