Skip to content

Commit

Permalink
Add nonce for to js for login to work with CSP (#32)
Browse files Browse the repository at this point in the history
Ultimately, just remove some stuff. No nonce needed.
  • Loading branch information
Oglopf authored Mar 23, 2023
1 parent 0f4b5b1 commit bb8409d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions form.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ attributes:
widget: "select"
label: "Codeserver Version"
options:
- ["4.8", "4.8.3"]
- ["3.9", "3.9.3"]
- ["3.4", "3.4.1"]
# - ["4.5", "4.5.1"]

working_dir:
label: "Working Directory"
Expand Down
5 changes: 1 addition & 4 deletions template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ code-server \
--auth="password" \
--bind-addr="0.0.0.0:${port}" \
--disable-telemetry \
<% if code_server_version < '4.5' %>
# code-server 4.5 will not accept this argument
--extra-extensions-dir="$CODE_SERVER_DATAROOT/extensions" \
<% end %>
--ignore-last-opened \
--user-data-dir="$CODE_SERVER_DATAROOT" \
--log debug \
"<%= working_dir.to_s %>"
2 changes: 1 addition & 1 deletion view.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
})();
</script>

<% if code_server_version == '4.5.1' %>
<% if code_server_version == '4.8.3' %>
<form id="<%= form_id %>" action="/rnode/<%= host %>/<%= port %>/login?to=" method="post" target="_blank">
<input type="hidden" name="password" value="<%= password %>">
<% else %>
Expand Down

0 comments on commit bb8409d

Please sign in to comment.