badmfck-api-server 1.4.7 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -31,6 +31,13 @@ class BaseEndpoint {
|
|
31
31
|
}
|
32
32
|
registerEndpoints(endpoints) {
|
33
33
|
for (let i of endpoints) {
|
34
|
+
if (i.endpoint === "" || i.endpoint === "/") {
|
35
|
+
let empty = i.endpoint === "";
|
36
|
+
i.endpoint = this.endpoint;
|
37
|
+
if (i.endpoint.endsWith("/") && empty)
|
38
|
+
i.endpoint = i.endpoint.substring(0, i.endpoint.length - 1);
|
39
|
+
continue;
|
40
|
+
}
|
34
41
|
if (i.endpoint.startsWith("/"))
|
35
42
|
i.endpoint = i.endpoint.substring(1);
|
36
43
|
if (i.endpoint.endsWith("/"))
|