v0.5.6: fix аудит Соннета — apply_effect стенд, mock_services, XSS, paramId валидация, serviceId=0 test
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user