summaryrefslogtreecommitdiff
path: root/webserver.js
diff options
context:
space:
mode:
Diffstat (limited to 'webserver.js')
-rwxr-xr-xwebserver.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/webserver.js b/webserver.js
index 40b7e28..ec5575c 100755
--- a/webserver.js
+++ b/webserver.js
@@ -271,28 +271,28 @@ app.get("/", function (req, res) {
// );
});
-app.get(["/f/univq", "/f/univq/*"], cmn.authgen());
+app.get(["/f/univq", "/f/univq/*rest"], cmn.authgen());
-app.get(["/f", "/f/*"], function (req, res) {
+app.get(["/f", "/f/*rest"], function (req, res) {
requestFile(req, res, unescape(makeUrlSafe(req, 2)), req.url);
});
-app.get(["/ff", "/ff/*"], cmn.authgen());
-app.get(["/ff", "/ff/*"], function (req, res) {
+app.get(["/ff", "/ff/*rest"], cmn.authgen());
+app.get(["/ff", "/ff/*rest"], function (req, res) {
requestFile(req, res, unescape(makeUrlSafe(req, 3)), req.url, {listdirs: true});
});
-app.get("/.well-known/matrix/*", function (req, res) {
+app.get("/.well-known/matrix/*rest", function (req, res) {
// Prevent these matrix files from being requested for every trifling event
// by giving them an explicit cache lifetime
requestFile(req, res, "/well-known" + unescape(makeUrlSafe(req, 12)), req.url, {mime: "application/json", cors: true, cache: "public, max-age=7200"});
});
-app.get("/.well-known/*", function (req, res) {
+app.get("/.well-known/*rest", function (req, res) {
requestFile(req, res, "/well-known" + unescape(makeUrlSafe(req, 12)), req.url);
});
-app.get("/google*.html", function (req, res) {
+/* app.get("/google*rest.html", function (req, res) {
const url = unescape(makeUrlSafe(req, 0));
if (url.match(/^\/google[0-9a-fA-F]*\.html$/)) {
const fname = __dirname + url;
@@ -303,13 +303,13 @@ app.get("/google*.html", function (req, res) {
} else {
res.status(404).send("That file does not exist.");
}
-});
+}); */
["o", "k", "rip", "rip2"].forEach(function (target) {
app.get("/" + target, function (req, res) {
res.sendFile(cmn.webfilesdir + "/" + target + ".html");
});
- app.get("/" + target + "/*", function (req, res) {
+ app.get("/" + target + "/*rest", function (req, res) {
res.set('Content-Type', 'text/html');
const msg = url.parse(req.url).pathname.slice(target.length + 2);
res.send(