working full end-to-end with encryption
This commit is contained in:
10
index.ts
10
index.ts
@@ -3,8 +3,18 @@ import type { Browser, BrowserContext, Page } from 'playwright';
|
||||
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
||||
import pino from 'pino';
|
||||
import express from 'express';
|
||||
import cors from 'cors'; // ADD THIS
|
||||
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use(cors({
|
||||
origin: ['http://localhost:5173', 'http://localhost:4000'],
|
||||
credentials: true,
|
||||
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
|
||||
allowedHeaders: ['Content-Type', 'Authorization']
|
||||
}));
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
const logger = pino({
|
||||
|
||||
Reference in New Issue
Block a user