Skip to content

Commit

Permalink
Merge pull request #98 from danielfrg/tmp-file-cookie
Browse files Browse the repository at this point in the history
Use tmp file for secure cookie
  • Loading branch information
ryanlovett authored Nov 12, 2021
2 parents 3c6e224 + 72e1118 commit 80c1db1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jupyter_rsession_proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import tempfile
from textwrap import dedent


def get_rstudio_executable(prog):
# Find prog in known locations
other_paths = [
Expand Down Expand Up @@ -55,12 +56,15 @@ def db_config():
return db_config_name

def _get_cmd(port):
ntf = tempfile.NamedTemporaryFile()
cmd = [
get_rstudio_executable('rserver'),
'--auth-none=1',
'--www-frame-origin=same',
'--www-port=' + str(port),
'--www-verify-user-agent=0'
'--www-verify-user-agent=0',
'--secure-cookie-key-file=' + ntf.name,
'--server-user=' + getpass.getuser(),
]

# Add additional options for RStudio >= 1.4.x. Since we cannot
Expand Down

0 comments on commit 80c1db1

Please sign in to comment.