Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { SET_LOADING } from "../store/actions/types";
- import axios from "axios";
- export const config = {
- SERVER_URL: `http://localhost:5000/`,
- AUTH_URL: `http://localhost:4000/api/auth`,
- httpHeaders: { headers: { 'Content-Type': 'application/json' } },
- // global axios setup
- setAuthHeaderToken: axios.interceptors.request.use(config => {
- config.headers.authorization = `Bearer ${localStorage.getItem('sre')}`;
- return config;
- }, error => Promise.reject(error)),
- setLoading: () => ({ type: SET_LOADING }),
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement