Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game-server-flip-jump
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Gia Vương
game-server-flip-jump
Commits
3be28113
Commit
3be28113
authored
Aug 19, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cors
parent
3b730de1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
index.js
dist/index.js
+3
-2
package.json
package.json
+1
-1
index.ts
src/index.ts
+3
-2
No files found.
dist/index.js
View file @
3be28113
...
@@ -11,10 +11,11 @@ const PORT = 3001;
...
@@ -11,10 +11,11 @@ const PORT = 3001;
const
server
=
http_1
.
default
.
createServer
(
server_1
.
default
);
const
server
=
http_1
.
default
.
createServer
(
server_1
.
default
);
const
io
=
new
socket_io_1
.
Server
(
server
,
{
const
io
=
new
socket_io_1
.
Server
(
server
,
{
cors
:
{
cors
:
{
origin
:
'*'
,
//
origin: '*',
methods
:
[
"GET"
,
"POST"
],
methods
:
[
"GET"
,
"POST"
],
// origin: ["http://localhost:7456"],
// origin: ["http://localhost:7456"],
// credentials: true,
origin
:
[
"https://play.gamee.vn"
,
"https://dev.gamee.vn"
,
"http://localhost:7456"
],
credentials
:
true
,
}
}
});
});
(
0
,
socket_1
.
setupSocket
)(
io
);
(
0
,
socket_1
.
setupSocket
)(
io
);
...
...
package.json
View file @
3be28113
{
{
"name"
:
"game-sever-flip-jump"
,
"name"
:
"game-sever-flip-jump"
,
"version"
:
"1.0.
0
"
,
"version"
:
"1.0.
1
"
,
"description"
:
""
,
"description"
:
""
,
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
src/index.ts
View file @
3be28113
...
@@ -8,10 +8,11 @@ const server = http.createServer(app);
...
@@ -8,10 +8,11 @@ const server = http.createServer(app);
const
io
=
new
Server
(
server
,
{
const
io
=
new
Server
(
server
,
{
cors
:
{
cors
:
{
origin
:
'*'
,
//
origin: '*',
methods
:
[
"GET"
,
"POST"
],
methods
:
[
"GET"
,
"POST"
],
// origin: ["http://localhost:7456"],
// origin: ["http://localhost:7456"],
// credentials: true,
origin
:
[
"https://play.gamee.vn"
,
"https://dev.gamee.vn"
,
"http://localhost:7456"
],
credentials
:
true
,
}
}
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment