Skip to content

Commit

Permalink
Merge pull request #145 from bl4drnnr/web-interface-dev
Browse files Browse the repository at this point in the history
change cors to only one origin
  • Loading branch information
bl4drnnr authored Apr 5, 2024
2 parents c85a6be + 02b4ffb commit e6e4f77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion mnemosyne-web-interface/mnemosyne-api-proxy/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ import { urlencoded, json } from 'express';
app.use(urlencoded({ extended: true, limit: '50mb' }));

app.enableCors({
origin: ['http://localhost:4200', 'https://mnemosyne.io'],
origin: 'https://mnemosyne.io',
credentials: true
});

// Working in the development mode
// app.enableCors({
// origin: ['http://localhost:4200', 'https://mnemosyne.io'],
// credentials: true
// });

const config = new DocumentBuilder()
.setTitle('Mnemosyne')
.setDescription('Documentation of Mnemosyne Proxy API.')
Expand Down
8 changes: 7 additions & 1 deletion mnemosyne-web-interface/mnemosyne-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ import { urlencoded, json } from 'express';
app.use(urlencoded({ extended: true, limit: '50mb' }));

app.enableCors({
origin: ['http://localhost:4201', 'https://proxy.mnemosyne.io'],
origin: 'https://proxy.mnemosyne.io',
credentials: true
});

// Working in the development mode
// app.enableCors({
// origin: ['http://localhost:4201', 'https://proxy.mnemosyne.io'],
// credentials: true
// });

const config = new DocumentBuilder()
.setTitle('Mnemosyne')
.setDescription('Documentation of Mnemosyne API.')
Expand Down

0 comments on commit e6e4f77

Please sign in to comment.