Functionality and state for popout

This commit is contained in:
mrjvs
2024-01-10 19:27:20 +01:00
parent 3a8144ee67
commit 5a3268fd29
13 changed files with 141 additions and 63 deletions

View File

@@ -3,7 +3,7 @@ import type { PlasmoMessaging } from '@plasmohq/messaging';
import type { BaseRequest } from '~types/request';
import type { BaseResponse } from '~types/response';
import { makeFullUrl } from '~utils/fetcher';
import { validateDomainWhiteList } from '~utils/storage';
import { assertDomainWhitelist } from '~utils/storage';
export interface Request extends BaseRequest {
baseUrl?: string;
@@ -26,7 +26,7 @@ type Response<T> = BaseResponse<{
const handler: PlasmoMessaging.MessageHandler<Request, Response<any>> = async (req, res) => {
try {
await validateDomainWhiteList(req.body.requestDomain);
await assertDomainWhitelist(req.body.requestDomain);
const response = await fetch(makeFullUrl(req.body.url, req.body), {
method: req.body.method,