Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
user-service
Commits
f4610f17
Commit
f4610f17
authored
3 years ago
by
ChakshuGautam
Browse files
Options
Download
Patches
Plain Diff
fix(cors): remove older cors and add it part of nestfactory
parent
5d401ae0
master
v2.4.4
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.9
v2.3.8
v2.3.7
v2.3.6
v2.3.5
v2.3.4
v2.3.3.1
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.0
v2.1.7
v2.1.6
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.0
v1.1.0
v1.1
v1.0.6
v1.0.5
v1.0.4
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.ts
+6
-6
src/main.ts
with
6 additions
and
6 deletions
+6
-6
src/main.ts
+
6
−
6
View file @
f4610f17
...
...
@@ -4,7 +4,7 @@ import { AppModule } from './app.module';
import
{
NestFactory
}
from
'
@nestjs/core
'
;
async
function
bootstrap
()
{
const
app
=
await
NestFactory
.
create
(
AppModule
);
const
app
=
await
NestFactory
.
create
(
AppModule
,
{
cors
:
true
}
);
const
config
=
new
DocumentBuilder
()
.
setTitle
(
'
e-Samwad User Service
'
)
...
...
@@ -14,11 +14,11 @@ async function bootstrap() {
.
build
();
const
document
=
SwaggerModule
.
createDocument
(
app
,
config
);
SwaggerModule
.
setup
(
'
api
'
,
app
,
document
);
app
.
enableCors
({
origin
:
'
*
'
,
methods
:
'
GET, PUT, POST, DELETE, PATCH, OPTIONS
'
,
allowedHeaders
:
'
Content-Type, Authorization
'
,
});
//
app.enableCors({
//
origin: '*',
//
methods: 'GET, PUT, POST, DELETE, PATCH, OPTIONS',
//
allowedHeaders: 'Content-Type, Authorization',
//
});
await
app
.
listen
(
3000
);
}
bootstrap
();
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets