Skip to content

Commit

Permalink
chore: allow all cors
Browse files Browse the repository at this point in the history
  • Loading branch information
Canvinus committed Sep 5, 2024
1 parent 130b6b0 commit 980ef22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 2 additions & 10 deletions nest/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,7 @@ async function bootstrap() {

// CORS setup
app.enableCors({
origin: [
'https://near.org',
'https://test.near.org',
'https://near.social',
'https://test.near.social',
'https://api.sourcescan.dev',
'https://sourcescan.dev',
'https://testnet.sourcescan.dev',
],
origin: ['*'],
methods: 'GET,POST',
allowedHeaders:
'Origin, X-Requested-With, Content-Type, Accept, Authorization',
Expand All @@ -45,7 +37,7 @@ async function bootstrap() {
// Swagger setup
const swaggerConfig = new DocumentBuilder()
.setTitle('SourceScan API')
.setVersion('2.0')
.setVersion('1.0')
.addBearerAuth()
.build();
const swaggerDoc = SwaggerModule.createDocument(app, swaggerConfig);
Expand Down
1 change: 1 addition & 0 deletions nginx/enode.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ server
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
add_header 'Access-Control-Allow-Origin' '*';
}

location /ipfs
Expand Down

0 comments on commit 980ef22

Please sign in to comment.