Skip to content

Commit

Permalink
后端同源
Browse files Browse the repository at this point in the history
  • Loading branch information
cooper-xs committed Jul 3, 2023
1 parent 5030af7 commit ed25105
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lightblog-be/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ async function start() {
const host = 'localhost';
const hostname = os.hostname();
const port = 3000;
const origin = process.env.ORIGIN_URL || 'http://localhost:8080';

app.use(cors({ origin, credentials: true }));
app.use(cors({ credentials: true }));
app.use(static_serve(__dirname + '/assets'));
app.use(bodyParser());
app.use(loggerMount());
Expand Down

0 comments on commit ed25105

Please sign in to comment.