1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
cors.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Main\Engine\ActionFilter\Attribute\Rule;
6
7use Attribute;
8use Bitrix\Main\Engine\ActionFilter\Attribute\FilterAttributeInterface;
9use Bitrix\Main\Engine\ActionFilter\FilterType;
10
11#[Attribute(Attribute::TARGET_METHOD)]
12final class Cors implements FilterAttributeInterface
13{
14 public function __construct(
15 private readonly ?string $origin = null,
16 private readonly ?bool $credentials = null,
17 private readonly FilterType $type = FilterType::EnablePrefilter,
18 )
19 {
20
21 }
22
23 public function getFilters(): array
24 {
25 if ($this->type->isNegative())
26 {
27 return [\Bitrix\Main\Engine\ActionFilter\Cors::class];
28 }
29
30 return [new \Bitrix\Main\Engine\ActionFilter\Cors($this->origin, $this->credentials)];
31 }
32
33 public function getType(): FilterType
34 {
35 return $this->type;
36 }
37}
$type
Определения options.php:106
__construct(private readonly ?string $origin=null, private readonly ?bool $credentials=null, private readonly FilterType $type=FilterType::EnablePrefilter,)
Определения cors.php:14
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804