mirror of
https://github.com/movie-web/extension.git
synced 2025-09-13 18:13:25 +00:00
really really basic domain whitelisting
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import type { PlasmoMessaging } from '@plasmohq/messaging';
|
||||
import { domainIsInWhitelist, validateDomainWhiteList } from '~utils/storage';
|
||||
|
||||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
|
||||
try {
|
||||
await validateDomainWhiteList(req.body.requestDomain);
|
||||
|
||||
const response = await fetch(req.body.url, {
|
||||
headers: req.body.headers,
|
||||
});
|
||||
|
Reference in New Issue
Block a user