Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Update middleware: Changed morgan from 'dev' to 'combined' and set CO…
Browse files Browse the repository at this point in the history
…RS origin to 'https://sale.posyayee.shop'
  • Loading branch information
boytur committed Dec 28, 2023
1 parent c56a938 commit 38708f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const bodyParser = require('body-parser');
const lineNotify = require('./notify/notify');

//middleware
app.use(morgan('dev'));
app.use(morgan('combined'));
app.use(bodyParser.json()); //เก็บข้อมูลจาก body

// ตั้งค่า CORS
const corsOptions = {
origin: '*',
origin: 'https://sale.posyayee.shop',
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
credentials: true, // ให้เปิดโอกาสให้ทำงานกับ cookies และ credentials
};
Expand Down

0 comments on commit 38708f5

Please sign in to comment.