Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix task api cors #15

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed cors-origin problem
ZhengLinLei committed Apr 22, 2024
commit 18b18527b44df5b87f22c47687a3ba6fb2056e96
3 changes: 3 additions & 0 deletions src/drone-api/index.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@ import _ddbb_config from './config/ddbb.js';
Custom import modules
*/
import express from 'express';
// Cors
import cors from 'cors';
import routes from './routes/routes.js';

/*
@@ -55,6 +57,7 @@ const app = express();
* CHECKAUTH
*/
app.use(express.json());
app.use(cors());
app.use(routes);


35 changes: 35 additions & 0 deletions src/drone-api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/drone-api/package.json
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@
"homepage": "https://github.com/oroneta/drone-module#readme",
"dependencies": {
"express": "^4.18.3",
"cors": "^2.8.5",
"moment": "^2.30.1",
"mongodb": "^6.4.0",
"mongoose": "^8.2.0",