Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webssh
Overview
Overview
Details
Activity
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
郑天保
webssh
Commits
377a3834
Commit
377a3834
authored
6 years ago
by
zhengtianbao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow CORS request
parent
d3da7ec5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
handler.py
webssh/handler.py
+5
-1
settings.py
webssh/settings.py
+1
-1
No files found.
webssh/handler.py
View file @
377a3834
...
...
@@ -43,7 +43,8 @@ class InvalidValueError(Exception):
class
MixinHandler
(
object
):
custom_headers
=
{
'Server'
:
'TornadoServer'
'Server'
:
'TornadoServer'
,
"Access-Control-Allow-Origin"
:
"*"
}
def
initialize
(
self
):
...
...
@@ -326,6 +327,9 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
class
WsockHandler
(
MixinHandler
,
tornado
.
websocket
.
WebSocketHandler
):
def
check_origin
(
self
,
origin
):
return
True
def
initialize
(
self
,
loop
):
self
.
loop
=
loop
self
.
worker_ref
=
None
...
...
This diff is collapsed.
Click to expand it.
webssh/settings.py
View file @
377a3834
...
...
@@ -49,7 +49,7 @@ def get_app_settings(options):
static_path
=
os
.
path
.
join
(
base_dir
,
'webssh'
,
'static'
),
websocket_ping_interval
=
options
.
wpintvl
,
debug
=
options
.
debug
,
xsrf_cookies
=
Tru
e
xsrf_cookies
=
Fals
e
)
return
settings
...
...
This diff is collapsed.
Click to expand it.
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