Remove axios dependency

We can use the Node.js Fetch API directly instead of relying on an
external dependency.

(cherry picked from commit 2d31afb92f)
This commit is contained in:
Alan Orth
2025-08-05 15:13:37 +03:00
committed by github-actions[bot]
parent 26c522176b
commit fd3b2dada3
3 changed files with 9 additions and 22 deletions

View File

@@ -25,7 +25,6 @@ import * as ejs from 'ejs';
import * as compression from 'compression';
import expressStaticGzip from 'express-static-gzip';
/* eslint-enable import/no-namespace */
import axios from 'axios';
import LRU from 'lru-cache';
import { isbot } from 'isbot';
import { createCertificate } from 'pem';
@@ -648,9 +647,9 @@ function isExcludedFromSsr(path: string, excludePathPattern: SsrExcludePatterns[
*/
function healthCheck(req, res) {
const baseUrl = `${REST_BASE_URL}${environment.actuators.endpointPath}`;
axios.get(baseUrl)
fetch(baseUrl)
.then((response) => {
res.status(response.status).send(response.data);
res.status(response.status).send(response);
})
.catch((error) => {
res.status(error.response.status).send({