-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description

The idea is to show a banner that indicates some headers are being injected in all requests. However to not look intrusive we will add an option under settings to allow setting up the urls user want to inject
const minimatch = require("minimatch");
// Example patterns and URLs
const patterns = [
"*", // Matches any URL
".*://localhost:3000/.*", // Matches URLs starting with http://localhost:3000 or https://localhost:3000
"*signadot.com*", // Matches any URL that contains "signadot.com"
];
const urls = [
"http://localhost:3000/somepath",
"https://localhost:3000/anotherpath",
"https://signadot.com",
"https://example.com",
];
// Function to check if any URL matches any of the patterns
const matchUrls = (patterns, urls) => {
return urls.filter(url => patterns.some(pattern => minimatch(url, pattern)));
};
cc: @foxish
cisnerosk and awsclint
Metadata
Metadata
Assignees
Labels
No labels