Browse Source

Small updates for building docker image

master
Joshua Rubingh 2 months ago
parent
commit
ef0b990bc9
  1. 6
      docker/Dockerfile
  2. 1
      plugins/axios.js

6
docker/Dockerfile

@ -43,12 +43,12 @@ RUN rm -rf node_modules && \
--production=true
#ARG DOCKER_CACHE
ARG DOCKER_CACHE
FROM ${DOCKER_CACHE}node:lts-alpine
# Set the build environments based on Docker ARGS
#ARG API_URL
#ARG API_HTTPS
ARG API_URL
ARG API_HTTPS
ENV API_URL=$API_URL
ENV API_HTTPS=$API_HTTPS

1
plugins/axios.js

@ -3,6 +3,7 @@ import { redirectToLogin } from '@/lib/redirect';
export default function (args) {
const { $axios, i18n, req, redirect } = args;
/* Set Django CSRF Token cookies and headers */
$axios.defaults.xsrfCookieName = 'csrftoken';
$axios.defaults.xsrfHeaderName = 'X-CSRFTOKEN';

Loading…
Cancel
Save