vimeo-axios.js 990 B

1234567891011121314151617181920212223242526272829303132
  1. import axios from 'axios'
  2. // TODO: make this one as settings (or find an other solution)
  3. // https://dev.to/sanfra1407/how-to-use-env-file-in-javascript-applications-with-webpack-18df
  4. // switch (app_env) {
  5. // case 'dev':
  6. // let path = `http://${window.location.hostname}:8984`
  7. // break;
  8. // case 'prod':
  9. // let path = `http://${window.location.hostname}/api`
  10. // break;
  11. // }
  12. // let path = 'http://dev.api.gdp.fr'
  13. // let path = 'http://localhost:8984'
  14. // const
  15. // let path = 'http://' + window.location.hostname + (window.env === 'prod' ? '/api' : ':8984')
  16. // contact@anarchive.net
  17. // anarchive_9
  18. // b2dbd10a42860e5540fa9f211f39e160
  19. export const VIMEO = axios.create({
  20. // withCredentials: true,
  21. baseURL: 'https://vimeo.com/api/oembed.json',
  22. crossorigin: true,
  23. headers: {
  24. 'Accept': 'application/json'
  25. // 'Authorization': `bearer b2dbd10a42860e5540fa9f211f39e160`,
  26. // 'Access-Control-Allow-Origin': '*'
  27. // 'Access-Control-Allow-Credentials':
  28. }
  29. })