platform/api/laravel/Http/Middleware/HandleCors.yaml
2024-09-02 10:44:11 -07:00

85 lines
2 KiB
YAML

name: HandleCors
class_comment: null
dependencies:
- name: Closure
type: class
source: Closure
- name: CorsService
type: class
source: Fruitcake\Cors\CorsService
- name: Container
type: class
source: Illuminate\Contracts\Container\Container
- name: Request
type: class
source: Illuminate\Http\Request
properties:
- name: container
visibility: protected
comment: '# * The container instance.
# *
# * @var \Illuminate\Contracts\Container\Container'
- name: cors
visibility: protected
comment: '# * The CORS service instance.
# *
# * @var \Fruitcake\Cors\CorsService'
methods:
- name: __construct
visibility: public
parameters:
- name: container
- name: cors
comment: "# * The container instance.\n# *\n# * @var \\Illuminate\\Contracts\\Container\\\
Container\n# */\n# protected $container;\n# \n# /**\n# * The CORS service instance.\n\
# *\n# * @var \\Fruitcake\\Cors\\CorsService\n# */\n# protected $cors;\n# \n#\
\ /**\n# * Create a new middleware instance.\n# *\n# * @param \\Illuminate\\\
Contracts\\Container\\Container $container\n# * @param \\Fruitcake\\Cors\\CorsService\
\ $cors\n# * @return void"
- name: handle
visibility: public
parameters:
- name: request
- name: next
comment: '# * Handle the incoming request.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Closure $next
# * @return \Illuminate\Http\Response'
- name: hasMatchingPath
visibility: protected
parameters:
- name: request
comment: '# * Get the path from the configuration to determine if the CORS service
should run.
# *
# * @param \Illuminate\Http\Request $request
# * @return bool'
- name: getPathsByHost
visibility: protected
parameters:
- name: host
comment: '# * Get the CORS paths for the given host.
# *
# * @param string $host
# * @return array'
traits:
- Closure
- Fruitcake\Cors\CorsService
- Illuminate\Contracts\Container\Container
- Illuminate\Http\Request
interfaces: []