v0.5.6: fix аудит Соннета — apply_effect стенд, mock_services, XSS, paramId валидация, serviceId=0 test

This commit is contained in:
2026-08-02 09:56:19 +04:00
parent b5ecf1dff3
commit 6f4ad7db32
7 changed files with 12 additions and 8 deletions
+3 -3
View File
@@ -92,15 +92,15 @@
showCommonExtensions: true,
// Предзаполняем токен для _mock/*
onComplete: function () {
const authToken = "{{ auth_token }}";
const authToken = {{ auth_token | tojson }};
if (authToken) {
ui.preauthorizeApiKey("mockAuth", authToken);
}
},
requestInterceptor: function (req) {
// Добавляем X-Mock-Auth только для _mock/* эндпоинтов
if (req.url.indexOf("/_mock/") !== -1 && "{{ auth_token }}") {
req.headers["X-Mock-Auth"] = "{{ auth_token }}";
if (req.url.indexOf("/_mock/") !== -1 && {{ auth_token | tojson }}) {
req.headers["X-Mock-Auth"] = {{ auth_token | tojson }};
}
return req;
},