Update index.js
Browse files
index.js
CHANGED
@@ -41,7 +41,6 @@ import { setup, serve } from './swagger.js';
|
|
41 |
import { swaggerOptions } from './settingOptions.js';
|
42 |
import path from "path";
|
43 |
import sharp from "sharp";
|
44 |
-
import cors from 'cors';
|
45 |
import bodyParser from 'body-parser';
|
46 |
import swaggerJsDoc from 'swagger-jsdoc';
|
47 |
|
@@ -71,16 +70,6 @@ app.use("/api/v1/", apiLimiter);
|
|
71 |
app.disable("x-powered-by");
|
72 |
app.disable("link")
|
73 |
|
74 |
-
const allowedOrigins = [
|
75 |
-
'https://randydev-ryu-js.hf.space',
|
76 |
-
];
|
77 |
-
|
78 |
-
app.use(cors({
|
79 |
-
origin: "*",
|
80 |
-
methods: ['GET', 'POST', 'PUT', 'DELETE'],
|
81 |
-
allowedHeaders: ['Content-Type', 'Authorization', 'x-api-key'],
|
82 |
-
}));
|
83 |
-
|
84 |
app.use(bodyParser.json());
|
85 |
app.use(
|
86 |
bodyParser.urlencoded({
|
|
|
41 |
import { swaggerOptions } from './settingOptions.js';
|
42 |
import path from "path";
|
43 |
import sharp from "sharp";
|
|
|
44 |
import bodyParser from 'body-parser';
|
45 |
import swaggerJsDoc from 'swagger-jsdoc';
|
46 |
|
|
|
70 |
app.disable("x-powered-by");
|
71 |
app.disable("link")
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
app.use(bodyParser.json());
|
74 |
app.use(
|
75 |
bodyParser.urlencoded({
|