Skip to content

Commit

Permalink
Add connect-src, add searchable for type
Browse files Browse the repository at this point in the history
  • Loading branch information
Firesphere authored Jun 29, 2023
1 parent fbf39e0 commit b135761
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Models/CSPDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use Page;
use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBEnum;
use SilverStripe\ORM\FieldType\DBVarchar;
use SilverStripe\ORM\ManyManyList;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
Expand All @@ -25,8 +27,8 @@ class CSPDomain extends DataObject implements PermissionProvider
private static $table_name = 'CSPDomain';

private static $db = [
'Domain' => 'Varchar(255)',
'Source' => 'Enum("default,script,style,img,media,font,form,frame,ancestor,worker")'
'Domain' => DBVarchar::class,
'Source' => DBEnum::class . '("default,script,style,img,media,font,form,frame,ancestor,worker,connect")'
];

private static $belongs_many_many = [
Expand Down Expand Up @@ -55,11 +57,13 @@ class CSPDomain extends DataObject implements PermissionProvider
'font' => 'Fonts',
'form' => 'Forms',
'frame' => 'Iframes',
'worker' => 'Worker'
'worker' => 'Worker',
'connect' => 'Connect'
];

private static $searchable_fields = [
'Domain',
'Source'
];

/**
Expand Down

0 comments on commit b135761

Please sign in to comment.