pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/codeCraft-Ritik/Elevate-AI/commit/b06a9d66e851ac06776a55ab19b0e423cb090eb7

ymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-9c8f61f9f58ad7b2.css" /> Fix: Dynamic CORS origen verification · codeCraft-Ritik/Elevate-AI@b06a9d6 · GitHub
Skip to content

Commit b06a9d6

Browse files
Fix: Dynamic CORS origen verification
1 parent 344c2a0 commit b06a9d6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/api/axios.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
// src/api/axios.js
12
import axios from 'axios';
23

34
const API = axios.create({
4-
// VITE_API_URL should be set to https://elevate-ai-2.onrender.com/api in your Render settings
5-
baseURL: import.meta.env.VITE_API_URL || 'http://localhost:5000/api',
5+
baseURL: 'http://localhost:5000/api',
66
});
77

88
API.interceptors.request.use((config) => {
9-
const token = localStorage.getItem('token');
9+
const token = localStorage.getItem('token'); // This must match the key used in Login.jsx
1010
if (token) {
11-
config.headers.Authorization = `Bearer ${token}`;
11+
config.headers.Authorization = `Bearer ${token}`; // Must include 'Bearer ' prefix
1212
}
1313
return config;
1414
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy