fix(server): try to fix CORS

pull/4/head
Cameron Clough 2022-03-24 23:47:25 +00:00
parent 365868dda3
commit 6bd8c85210
No known key found for this signature in database
GPG Key ID: BFB3B74B026ED43F
1 changed files with 2 additions and 1 deletions

View File

@ -17,8 +17,9 @@ export default async () => {
const logger = log4js.getLogger();
const app = express();
// TODO: move cors options to dotenv for development?
app.use(cors({
origin: ['http://localhost:3000', 'https://connect.retropilot.org'],
origin: [process.env.BASE_URL, 'https://connect.retropilot.org', 'http://localhost:8080', 'http://localhost:3000'],
credentials: true,
}));
app.use(cookieParser());