-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.html.erb
More file actions
20 lines (19 loc) · 855 Bytes
/
view.html.erb
File metadata and controls
20 lines (19 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<script type="text/javascript">
(function () {
let d = new Date();
d.setTime(d.getTime() + (7*24*60*60*1000));
let expires = "expires="+ d.toUTCString();
let cookie = `csrf-token=<%= csrftoken %>;${expires};path=/rnode/<%= host %>/<%= port %>/;SameSite=Strict;Secure;`
document.cookie = cookie;
})();
</script>
<form action="/rnode/<%= host %>/<%= port %>/login" method="POST" target="_blank">
<input type="hidden" name="username" value="<%= ENV["USER"] %>">
<input type="hidden" name="password" value="<%= password %>">
<input type="hidden" name="staySignedIn" value="1">
<input type="hidden" name="appUri" value="">
<input id="csrfToken" type="hidden" name="csrf-token" value="<%= csrftoken %>"/>
<button class="btn btn-primary" type="submit">
<i class="fa fa-code"></i> Connect to VS Code Server
</button>
</form>