add cors
This commit is contained in:
parent
e149c1c388
commit
ab84eb7076
4 changed files with 237 additions and 201 deletions
|
|
@ -8,6 +8,8 @@ import { renderToStaticMarkup } from "react-dom/server";
|
|||
|
||||
// biome-ignore lint/style/useImportType: <explanation>
|
||||
import React, {} from "react";
|
||||
import cors from "cors";
|
||||
|
||||
const { PORTA, PREFIXO } = ambiente;
|
||||
|
||||
const _iframe = String(Math.random());
|
||||
|
|
@ -55,7 +57,7 @@ gerar.then(() => {
|
|||
const app = express();
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded());
|
||||
|
||||
app.use(cors({ origin: "*" }));
|
||||
app.get([PREFIXO, `${PREFIXO}/`], (req, res) => {
|
||||
const html = (
|
||||
<html lang="pt-BR">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue