Add release headers service, runtime-aware API header handling, and i18n updates for release configuration
- Implement `releaseHeaders.js` to manage release-related HTTP headers. - Update requests to include runtime-based release headers. - Extend i18n phrases across multiple locales for release runtime and configuration labels. - Enhance unit tests for header building and API availability error handling.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import axios from "axios";
|
||||
import { enqueueRequest } from "@/services/requestQueue.js";
|
||||
import { rewriteReleaseApiUrl } from "@/services/releaseTimeline.js";
|
||||
import { buildCurrentReleaseHeaders, rewriteReleaseApiUrl } from "@/services/releaseTimeline.js";
|
||||
|
||||
let requestInterceptorId = null;
|
||||
|
||||
@@ -36,6 +36,12 @@ export const installAxiosRequestQueue = () => {
|
||||
if (config?.__skipReleaseApiRewrite !== true && config?.baseURL) {
|
||||
config.baseURL = rewriteReleaseApiUrl(config.baseURL);
|
||||
}
|
||||
if (config?.__skipReleaseApiRewrite !== true) {
|
||||
config.headers = {
|
||||
...buildCurrentReleaseHeaders(),
|
||||
...(config.headers || {}),
|
||||
};
|
||||
}
|
||||
|
||||
if (isQueueBypassed(config) || config?.__queueAdapterWrapped) {
|
||||
return config;
|
||||
|
||||
Reference in New Issue
Block a user