Skip to content

Commit

Permalink
build: disable webssh ui
Browse files Browse the repository at this point in the history
Prevent abuse usage
  • Loading branch information
gsanchietti committed Apr 5, 2024
1 parent 822b5ca commit 31d8022
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ buildah run \
adduser -Ss /bin/false -g webssh webssh && \
chown -R webssh:webssh /code
"
# disable built-in ui
buildah add "${webssh}" ../../webssh/index.html /code/webssh/templates/index.html
# cleanup the container
buildah run \
--workingdir '/code' \
${webssh} \
sh -c 'rm -rf preview docker-compose.yml setup.* tests'
popd
popd
rm -rf webssh_tmp
Expand Down
17 changes: 17 additions & 0 deletions webssh/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> WebSSH </title>
<link href="static/img/favicon.png" rel="icon" type="image/png">
</head>
<body>
<div class="container form-container" style="display: none">
<form id="connect" action="" method="post" enctype="multipart/form-data"{% if debug %} novalidate{% end %}>
<input type="hidden" id="term" name="term" value="xterm-256color">
{% module xsrf_form_html() %}
</form>
</div>
<script src="static/js/main.js"></script>
</body>
</html>

0 comments on commit 31d8022

Please sign in to comment.