Fix Safari site image upload headers

This commit is contained in:
Frudrax Cheng
2026-06-02 11:10:57 +08:00
parent a19204d4b5
commit 2bf43ac3e3
+3
View File
@@ -26,6 +26,9 @@ const apiClient = axios.create({
});
apiClient.interceptors.request.use((config) => {
if (config.data instanceof FormData) {
delete config.headers['Content-Type'];
}
const token = localStorage.getItem('authToken');
if (token) {
config.headers.Authorization = `Bearer ${token}`;