Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CouchPotatoServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
CouchPotatoServer
Commits
cfaffe2b
Commit
cfaffe2b
authored
Jan 9, 2013
by
Ruud
Browse files
Options
Downloads
Patches
Plain Diff
SSL support
parent
432852cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
couchpotato/core/_base/_core/__init__.py
+10
-8
10 additions, 8 deletions
couchpotato/core/_base/_core/__init__.py
couchpotato/runner.py
+13
-3
13 additions, 3 deletions
couchpotato/runner.py
with
23 additions
and
11 deletions
couchpotato/core/_base/_core/__init__.py
+
10
−
8
View file @
cfaffe2b
...
...
@@ -23,20 +23,22 @@ config = [{
'
default
'
:
''
,
'
type
'
:
'
password
'
,
},
{
'
name
'
:
'
host
'
,
'
advanced
'
:
True
,
'
default
'
:
'
0.0.0.0
'
,
'
hidden
'
:
True
,
'
label
'
:
'
IP
'
,
'
description
'
:
'
Host that I should listen to.
"
0.0.0.0
"
listens to all ips.
'
,
},
{
'
name
'
:
'
port
'
,
'
default
'
:
5050
,
'
type
'
:
'
int
'
,
'
description
'
:
'
The port I should listen to.
'
,
},
{
'
name
'
:
'
ssl_cert
'
,
'
description
'
:
'
Path to SSL server.crt
'
,
'
advanced
'
:
True
,
},
{
'
name
'
:
'
ssl_key
'
,
'
description
'
:
'
Path to SSL server.key
'
,
'
advanced
'
:
True
,
},
{
'
name
'
:
'
launch_browser
'
,
'
default
'
:
True
,
...
...
This diff is collapsed.
Click to expand it.
couchpotato/runner.py
+
13
−
3
View file @
cfaffe2b
...
...
@@ -4,6 +4,7 @@ from couchpotato.api import api, NonBlockHandler
from
couchpotato.core.event
import
fireEventAsync
,
fireEvent
from
couchpotato.core.helpers.variable
import
getDataDir
,
tryInt
from
logging
import
handlers
from
tornado.httpserver
import
HTTPServer
from
tornado.web
import
Application
,
FallbackHandler
from
tornado.wsgi
import
WSGIContainer
from
werkzeug.contrib.cache
import
FileSystemCache
...
...
@@ -210,8 +211,9 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
# app.debug = development
config
=
{
'
use_reloader
'
:
reloader
,
'
host
'
:
Env
.
setting
(
'
host
'
,
default
=
'
0.0.0.0
'
),
'
port
'
:
tryInt
(
Env
.
setting
(
'
port
'
,
default
=
5000
))
'
port
'
:
tryInt
(
Env
.
setting
(
'
port
'
,
default
=
5000
)),
'
ssl_cert
'
:
Env
.
setting
(
'
ssl_cert
'
,
default
=
None
),
'
ssl_key
'
:
Env
.
setting
(
'
ssl_key
'
,
default
=
None
),
}
# Static path
...
...
@@ -243,12 +245,20 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
debug
=
config
[
'
use_reloader
'
]
)
if
config
[
'
ssl_cert
'
]
and
config
[
'
ssl_key
'
]:
server
=
HTTPServer
(
application
,
no_keep_alive
=
True
,
ssl_options
=
{
"
certfile
"
:
config
[
'
ssl_cert
'
],
"
keyfile
"
:
config
[
'
ssl_key
'
],
})
else
:
server
=
HTTPServer
(
application
,
no_keep_alive
=
True
)
try_restart
=
True
restart_tries
=
5
while
try_restart
:
try
:
application
.
listen
(
config
[
'
port
'
]
,
config
[
'
host
'
],
no_keep_alive
=
True
)
server
.
listen
(
config
[
'
port
'
])
loop
.
start
()
except
Exception
,
e
:
try
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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