Skip to content

Instantly share code, notes, and snippets.

View jamiehaywood's full-sized avatar

Jamie Haywood jamiehaywood

View GitHub Profile
@jamiehaywood
jamiehaywood / axios.js
Created May 13, 2020 13:52
Axios Key Rotation
import axios from "axios";
import { getHeaders } from "./auth/getHeaders";
import { updateTokens } from "./auth/updateTokens";
// https://github.com/axios/axios/issues/1383
const customAxios = axios.create({
baseURL: process.env.REACT_APP_CAPTURAPI,
});