Sha256: 1b6620b346cd208264f7929cc8595b6d2b1842cba4cab1796b775229c1a81f06

Contents?: true

Size: 334 Bytes

Versions: 25

Compression:

Stored size: 334 Bytes

Contents

import axios from 'axios'

const token = document.querySelector('[name="csrf-token"]') || {
  content: 'no-csrf-token',
}
const instance = axios.create({
  headers: {
    common: {
      'X-CSRF-TOKEN': token.content,
      'Content-Type': 'application/json',
      Accept: 'application/json',
    },
  },
})

export default instance

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
maglevcms-1.8.0 app/frontend/admin/utils/axios.js
maglevcms-1.7.3 app/frontend/admin/utils/axios.js
maglevcms-1.7.2 app/frontend/admin/utils/axios.js
maglevcms-1.7.1 app/frontend/admin/utils/axios.js
maglevcms-1.7.0 app/frontend/admin/utils/axios.js
maglevcms-1.6.1 app/frontend/admin/utils/axios.js
maglevcms-1.6.0 app/frontend/admin/utils/axios.js
maglevcms-1.5.1 app/frontend/admin/utils/axios.js
maglevcms-1.4.0 app/frontend/admin/utils/axios.js
maglevcms-1.3.0 app/frontend/admin/utils/axios.js
maglevcms-1.2.2 app/frontend/admin/utils/axios.js
maglevcms-1.2.1 app/frontend/admin/utils/axios.js
maglevcms-1.2.0 app/frontend/admin/utils/axios.js
maglevcms-1.1.7 app/frontend/admin/utils/axios.js
maglevcms-1.1.6 app/frontend/admin/utils/axios.js
maglevcms-1.1.5 app/frontend/admin/utils/axios.js
maglevcms-1.1.4 app/frontend/admin/utils/axios.js
maglevcms-1.1.3 app/frontend/admin/utils/axios.js
maglevcms-1.1.2 app/frontend/admin/utils/axios.js
maglevcms-1.1.1 app/frontend/admin/utils/axios.js