Cho một chuỗi Content-Security-Policy và tên một directive cần tra cứu. In ra danh sách nguồn của directive đó (các nguồn nối bằng 1 space). Nếu directive không tồn tại, in NOT_FOUND. Nếu directive tồn tại nhưng không có nguồn (vd upgrade-insecure-requests), in dòng rỗng.
Input:
;, có thể có khoảng trắng thừa).Input:
default-src 'self'; img-src 'self' data:
img-src
Output:
'self' data:
Dòng 1: CSP. Dòng 2: tên directive.
CSP không rỗng.
Danh sách nguồn hoặc NOT_FOUND.
Ví dụ:
Đầu vào:
default-src 'self'; img-src 'self' data:
img-src
Đầu ra:
'self' data:
Giải thích:
Đang tải editor...