Download the PHP package wernerdweight/cors-bundle without Composer

On this page you can find all versions of the php package wernerdweight/cors-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cors-bundle

CORSBundle

Symfony bundle that handles cross-origin resource sharing headers.

Build Status Latest Stable Version Total Downloads License

Installation

1. Download using composer

2. Enable the bundle

Enable the bundle in your kernel:

Configuration

None of the configuration keys are mandatory, default values are mentioned in comments.

Target controllers

All controllers that implement WernerDweight\CORSBundle\Controller\CORSControllerInterface will be targeted automatically (no configuration required).

If you can't modify the controller (e.g. it's vendor code), you can specify an interface implemented by the vendor controller (be aware that it may also be implemented by some other controllers), or specify the class of the controller itself.

If you want to target all controllers, use * as configuration value for target_controllers.

Usage

Use your API as usual, your preconfigured headers will be present in the response for specified controllers.

Events

The following events are dispatched, so you can hook in the process. For general info on how to use events, please consult the official Symfony documentation.

PreflightRequestInterceptedEvent (wds.cors_bundle.preflight_request_intercepted) \ Issued before the response for preflight request is returned. Contains the request and response. You may want to update the response with some arbitrary headers or replace it completely (the default response is a simple 200: OK response with configured headers).

GetResponseHeadersEvent (wds.cors_bundle.get_response_headers) \ Issued before the response headers are set to the response. Contains the request and headers (array). You may want to set some custom headers.

License

This bundle is under the MIT license. See the complete license in the root directiory of the bundle.


All versions of cors-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/framework-bundle Version ^4.0|^5.0|^6.0
thecodingmachine/safe Version ^2.4
wernerdweight/ra Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wernerdweight/cors-bundle contains the following files

Loading the files please wait ....