Skip to content

Commit

Permalink
upd. simple mde toolbar
Browse files Browse the repository at this point in the history
 * pass debug env to frontend instead of checking local addr
  • Loading branch information
a-sync committed Mar 23, 2024
1 parent 5549e69 commit 402854b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion public/game-server-config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
"toolbar": [
"bold",
"italic",
"strikethrough",
"|",
"unordered-list",
"ordered-list",
Expand All @@ -219,8 +220,9 @@
"link",
"quote",
"|",
"preview",
"side-by-side",
"preview"
"fullscreen"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $(async () => {
"use_default_values": true,
"ajax": true,
"ajaxCredentials": false,
"ajax_cache_responses": !Boolean(location.hostname === "localhost" || location.hostname === "127.0.0.1"),
"ajax_cache_responses": !Boolean(gswFeatures.debug),
"ajax_cache_buster": 'gsw-v' + gswFeatures.features.version + '+gamedig-v' + gswFeatures.features.gamedig,
"disable_edit_json": false,
"disable_collapse": true,
Expand Down
3 changes: 3 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface FeaturesResponse{
telegram: boolean;
slack: boolean;
};
debug?: boolean;
}

interface ConfigResponse{
Expand Down Expand Up @@ -106,6 +107,8 @@ createServer(async (req, res) => {
let status = 200;
let re: ApiResponse = {};

if (DBG) re.debug = true;

if (validateBearerToken(String(req.headers['x-btoken']))) {
const reqPath = p.split('/');
try {
Expand Down

0 comments on commit 402854b

Please sign in to comment.