dev-master
9999999-dev https://github.com/funddy/jscrossdomain-bundleJs cross domain bundle for Symfony2
MIT
The Requires
- php >=5.3.3
- symfony/framework-bundle >=2.0
The Development Requires
ajax cross domain
Js cross domain bundle for Symfony2
This bundle enables you to make cross domain requests with Javascript., (*2)
Add the following to your composer.json file:, (*3)
{ "require": { "funddy/jscrossdomain-bundle": "1.0.*" } }
Update the vendor libraries:, (*4)
curl -s http://getcomposer.org/installer | php php composer.phar install
Register the Bundle FunddyJsCrossDomainBundle in app/AppKernel.php., (*5)
// ... public function registerBundles() { $bundles = array( // ... new Funddy\Bundle\JsCrossDomainBundle\FunddyJsCrossDomainBundle() // ... ); // ... }
Include cross domain route at app/config/routing.yml, (*6)
cross_domain: resource: "@FunddyJsCrossDomainBundle/Resources/config/routing.yml"
Configure allowed cross domain URLs at app/config/config.yml, (*7)
funddy_js_cross_domain: allowed: - http://graph.facebook.com/?ids=
Make cross domain request, (*8)
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script> <script src="{{ asset('bundles/funddyjscrossdomain/js/lib/funddycrossdomain.js') }}"></script> <script> var cd = new FUNDDY.CrossDomain($); cd.get("http://graph.facebook.com/?ids=https://funddy.com").done(function(response) { console.log(response); }); </script>
Js cross domain bundle for Symfony2
MIT
ajax cross domain