🚚 back: move diagnostics end points outside of exposed routes (#762)
This commit is contained in:
@@ -9,7 +9,7 @@ import registerBasicProviders from "./providers";
|
|||||||
* The diagnostics service exposes endpoint that are of use for operational reasons.
|
* The diagnostics service exposes endpoint that are of use for operational reasons.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Prefix("/api/diagnostics")
|
@Prefix("/diagnostics")
|
||||||
@Consumes(["webserver"])
|
@Consumes(["webserver"])
|
||||||
@ServiceName("diagnostics")
|
@ServiceName("diagnostics")
|
||||||
export default class DiagnosticsService extends TdriveService<DiagnosticsServiceAPI> {
|
export default class DiagnosticsService extends TdriveService<DiagnosticsServiceAPI> {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ describe("The diagnostics infrastucture", () => {
|
|||||||
const getDiagnosticTags = (tag: string, secret: string) =>
|
const getDiagnosticTags = (tag: string, secret: string) =>
|
||||||
platform.app.inject({
|
platform.app.inject({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: `/api/diagnostics/t/${encodeURIComponent(tag)}?secret=${encodeURIComponent(secret)}`,
|
url: `/diagnostics/t/${encodeURIComponent(tag)}?secret=${encodeURIComponent(secret)}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should refuse invalid probe secrets", async () => {
|
it("should refuse invalid probe secrets", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user