mirror of https://github.com/coder/code-server.git
Allow app-name configuration to change the name of the PWA (#6093)
This commit is contained in:
parent
78282a1fd6
commit
bca733de3d
|
@ -40,6 +40,7 @@ export class CodeServerRouteWrapper {
|
||||||
//#region Route Handlers
|
//#region Route Handlers
|
||||||
|
|
||||||
private manifest: express.Handler = async (req, res, next) => {
|
private manifest: express.Handler = async (req, res, next) => {
|
||||||
|
const appName = req.args["app-name"] || "code-server"
|
||||||
res.writeHead(200, { "Content-Type": "application/manifest+json" })
|
res.writeHead(200, { "Content-Type": "application/manifest+json" })
|
||||||
|
|
||||||
return res.end(
|
return res.end(
|
||||||
|
@ -47,8 +48,8 @@ export class CodeServerRouteWrapper {
|
||||||
req,
|
req,
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
{
|
{
|
||||||
name: "code-server",
|
name: appName,
|
||||||
short_name: "code-server",
|
short_name: appName,
|
||||||
start_url: ".",
|
start_url: ".",
|
||||||
display: "fullscreen",
|
display: "fullscreen",
|
||||||
description: "Run Code on a remote server.",
|
description: "Run Code on a remote server.",
|
||||||
|
|
Loading…
Reference in New Issue