Add flag to enable permessage-deflate

This commit is contained in:
Asher
2021-05-04 16:46:08 -05:00
parent 92bf2c9760
commit 083400b50a
4 changed files with 41 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ import { createApp, ensureAddress } from "./app"
import {
AuthType,
DefaultedArgs,
Feature,
optionDescriptions,
parse,
readConfigFile,
@@ -146,6 +147,21 @@ const main = async (args: DefaultedArgs): Promise<void> => {
}
}
if (args.enable && args.enable.length > 0) {
logger.info("Enabling the following experimental features:")
args.enable.forEach((feature) => {
if (Object.values(Feature).includes(feature as Feature)) {
logger.info(` - "${feature}"`)
} else {
logger.error(` X "${feature}" (unknown feature)`)
}
})
// TODO: Could be nice to add wrapping to the logger?
logger.info(
" The code-server project does not provide stability guarantees or commit to fixing bugs relating to these experimental features. When filing bug reports, please ensure that you can reproduce the bug with all experimental features turned off.",
)
}
if (!args.socket && args.open) {
// The web socket doesn't seem to work if browsing with 0.0.0.0.
const openAddress = serverAddress.replace("://0.0.0.0", "://localhost")