Optional proxyAuth

This commit is contained in:
Dennis Schwerdel 2021-04-19 21:00:35 +02:00
parent e8f7788d79
commit 03e3a0dfa7
2 changed files with 9 additions and 1 deletions

View File

@ -13,8 +13,10 @@
"website": "https://github.com/cdr/code-server", "website": "https://github.com/cdr/code-server",
"contactEmail": "support@cloudron.io", "contactEmail": "support@cloudron.io",
"icon": "logo.png", "icon": "logo.png",
"optionalSso": true,
"addons": { "addons": {
"localstorage": {} "localstorage": {},
"proxyAuth": { "path": "!/healthz" }
}, },
"capabilities": [ "capabilities": [
], ],

View File

@ -23,6 +23,12 @@ if ! [ -f /app/data/vscode/config/config.yaml ]; then
echo "Generated random password: ${PASSWORD}" echo "Generated random password: ${PASSWORD}"
fi fi
if [ "${CLOUDRON_PROXY_AUTH:=0}" == "1" ]; then
sed -i "s/^auth:.*/auth: none/g" /app/data/vscode/config/config.yaml
else
sed -i "s/^auth:.*/auth: password/g" /app/data/vscode/config/config.yaml
fi
chown -R cloudron: /app/data chown -R cloudron: /app/data
grep -e '^password' --color=never /app/data/vscode/config/config.yaml grep -e '^password' --color=never /app/data/vscode/config/config.yaml