104
*/
105
export function isUrlApproved(
107
>
approvedUrls: Record<string, boolean | IUrlApprovalSettings>,
108
>
checkRequest: boolean
109
>
): boolean {
110
>
const normalizedUrlStr = normalizeURL(url);
111
>
const normalizedUrl = URI.parse(normalizedUrlStr);
112
>
113
>
for (const [pattern, settings] of Object.entries(approvedUrls)) {
114
>
// Check if URL matches this pattern
115
>
if (testUrlMatchesGlob(normalizedUrl, pattern)) {
116
// Handle boolean settings
117
if (typeof settings === 'boolean') {