Skip to content

Commit

Permalink
chore(CORS): add generated configuration
Browse files Browse the repository at this point in the history
Command: `php spark cors:publish`
  • Loading branch information
KennethTrecy committed Jul 28, 2023
1 parent c77341f commit c68cfbc
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions app/Config/Cors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?php

namespace Config;


/**
* --------------------------------------------------------------------------
* Cross-Origin Resource Sharing (CORS) Configuration
* --------------------------------------------------------------------------
*
* Here you may configure your settings for cross-origin resource sharing
* or "CORS". This determines what cross-origin operations may execute
* in web browsers. You are free to adjust these settings as needed.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
*/
class Cors extends \Fluent\Cors\Config\Cors
{
/**
* --------------------------------------------------------------------------
* Allowed HTTP headers
* --------------------------------------------------------------------------
*
* Indicates which HTTP headers are allowed.
*
* @var array
*/
public $allowedHeaders = ['*'];

/**
* --------------------------------------------------------------------------
* Allowed HTTP methods
* --------------------------------------------------------------------------
*
* Indicates which HTTP methods are allowed.
*
* @var array
*/
public $allowedMethods = ['*'];

/**
* --------------------------------------------------------------------------
* Allowed request origins
* --------------------------------------------------------------------------
*
* Indicates which origins are allowed to perform requests.
* Patterns also accepted, for example *.foo.com
*
* @var array
*/
public $allowedOrigins = ['*'];

/**
* --------------------------------------------------------------------------
* Allowed origins patterns
* --------------------------------------------------------------------------
*
* Patterns that can be used with `preg_match` to match the origin.
*
* @var array
*/
public $allowedOriginsPatterns = [];

/**
* --------------------------------------------------------------------------
* Exposed headers
* --------------------------------------------------------------------------
*
* Headers that are allowed to be exposed to the web server.
*
* @var array
*/
public $exposedHeaders = [];

/**
* --------------------------------------------------------------------------
* Max age
* --------------------------------------------------------------------------
*
* Indicates how long the results of a preflight request can be cached.
*
* @var int
*/
public $maxAge = 0;

/**
* --------------------------------------------------------------------------
* Whether or not the response can be exposed when credentials are present
* --------------------------------------------------------------------------
*
* Indicates whether or not the response to the request can be exposed when the
* credentials flag is true. When used as part of a response to a preflight
* request, this indicates whether or not the actual request can be made
* using credentials. Note that simple GET requests are not preflighted,
* and so if a request is made for a resource with credentials, if
* this header is not returned with the resource, the response
* is ignored by the browser and not returned to web content.
*
* @var boolean
*/
public $supportsCredentials = false;
}

0 comments on commit c68cfbc

Please sign in to comment.