refactor(frontend): replace Axios with the Fetch API
Author: xfournetCreated Sep 19, 2026Updated Sep 19, 2026
Labelsfiligran team
Summary
opencti-front declares a direct dependency on axios (1.20.0) that is used in only four places, all of them loading stored file content from /storage/view/.... The native fetch API covers these cases, so the dependency can be dropped from the front end.
Current usage
| File | What it loads |
|---|---|
src/private/components/common/files/workbench/WorkbenchFileContent.jsx |
workbench bundle (JSON) |
src/private/components/common/stix_core_objects/StixCoreObjectContent.jsx |
content file (text) |
src/private/components/common/stix_core_objects/StixCoreObjectFileExport.tsx |
content file (text) |
src/private/components/settings/exclusion_lists/ExclusionListEdition.tsx |
exclusion list file (text) |
All four call Axios.get(url) and read res.data.
Proposal
- Replace those four calls with
fetch, checkingResponse.okexplicitly and reading the body as JSON or text depending on the caller. - Remove
axiosfrom thedependenciesofopencti-front/package.json. - Keep the
axiosentry inresolutions: axios is still pulled in transitively by thei18n-auto-translationdev dependency, and the resolution keeps that version pinned.
Scope
Front end only. The back end also uses axios, and that part is tracked separately — it was covered together with the front end in #15431, which this issue splits.
Source: OpenCTI-Platform/opencti