generated from KennethTrecy/web_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(CORS): add generated configuration
Command: `php spark cors:publish`
- Loading branch information
1 parent
c77341f
commit c68cfbc
Showing
1 changed file
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |