Skip to content

Commit 667c2ba

Browse files
update tos file to dinamically update server host url
1 parent e53c7ad commit 667c2ba

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

resources/tos.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Terms of Service
44
We know that freedom is something very important to you, but the responsibility we have in offering a service to third parties where foreign content can be hosted is very great. Therefore it is necessary that you agree to these points, we believe it is reasonable to agree to this before proceeding. By using our website you are agreed with this:
55

66
* Stay humble, stay free.
7-
* By registering an account with localhost, or uploading files you agree to be bound by these Terms of Service.
7+
* By registering an account with [SERVERADDRESS], or uploading files you agree to be bound by these Terms of Service.
88
* You agree to not use this service for impersonating other people.
99
* You agree to not use offensive, racist or vulgar user names.
10-
* localhost reserves the right to revoke a registration at any time, without prior notice.
11-
* Obtaining a localhost account does not imply that the opinions expressed by the user are the same as those of the development team.
12-
* You agree to not upload any illegal content in localhost jurisdiction's.
10+
* [SERVERADDRESS] reserves the right to revoke a registration at any time, without prior notice.
11+
* Obtaining a [SERVERADDRESS] account does not imply that the opinions expressed by the user are the same as those of the development team.
12+
* You agree to not upload any illegal content in [SERVERADDRESS] jurisdiction's.
1313
* We reserve the right to modify or terminate these Terms of Service for any reason, without notice at any time.
14-
* You are responsible for regularly reviewing these Terms of Service. Your continued use of localhost after any such change constitutes your acceptance of the new Terms of Service.
15-
* You agree to not use localhost for any illegal activities or activities that violate any applicable laws or regulations.
14+
* You are responsible for regularly reviewing these Terms of Service. Your continued use of [SERVERADDRESS] after any such change constitutes your acceptance of the new Terms of Service.
15+
* You agree to not use [SERVERADDRESS] for any illegal activities or activities that violate any applicable laws or regulations.
1616
* You agree to not violate the intellectual property rights of any third party.
17-
* localhost will remove any content that we deem to be inappropriate or in violation of these Terms of Service.
17+
* [SERVERADDRESS] will remove any content that we deem to be inappropriate or in violation of these Terms of Service.

src/controllers/frontend.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ const loadTosPage = async (req: Request, res: Response, version:string): Promise
6464
logger.info("GET /api/" + version + "/tos", "|", getClientIp(req));
6565

6666
req.body.version = app.get("version");
67-
const tosFile = markdownToHtml(fs.readFileSync(config.get("server.tosFilePath")).toString());
67+
let tosFile = markdownToHtml(fs.readFileSync(config.get("server.tosFilePath")).toString());
68+
tosFile = tosFile.replace(/\[SERVERADDRESS\]/g, app.get("server.host"));
6869

6970
res.render("tos.ejs", {request: req, tos: tosFile });
7071
};

0 commit comments

Comments
 (0)