Skip to content

Commit 7a6765a

Browse files
Fix API header merge preserving JSON content type
1 parent aec3544 commit 7a6765a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frontend/src/api/rakshaRideApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const AI = import.meta.env.VITE_AI_BASE_URL || '/ai';
99
async function request(url, options = {}) {
1010
try {
1111
const res = await fetch(url, {
12-
headers: { 'Content-Type': 'application/json', ...options.headers },
1312
...options,
13+
headers: { 'Content-Type': 'application/json', ...(options.headers || {}) },
1414
});
1515

1616
const contentType = res.headers.get('content-type') || '';

0 commit comments

Comments
 (0)