diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2d6f9b9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +image: jakzal/phpqa:php7.3 + +stages: + - Security + - CodingStandards + +security: + stage: Security + script: + - local-php-security-checker --format=json --path=./composer.lock > security-checker-report.json + artifacts: + when: on_failure + expose_as: 'security-checker' + paths: + - security-checker-report.json + allow_failure: true + +phpcs: + stage: CodingStandards + script: + - phpcs --report=junit --report-file=phpcs-report.xml + artifacts: + when: on_failure + expose_as: 'phpcs' + paths: + - phpcs-report.xml + reports: + junit: phpcs-report.xml + allow_failure: false \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 486a05d..2cd6566 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "loue", + "name": "srcs", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/resources/ts/common.ts b/resources/ts/common.ts index 4dff0e1..364ce54 100644 --- a/resources/ts/common.ts +++ b/resources/ts/common.ts @@ -7,7 +7,12 @@ const bootstrap = require("bootstrap"); * to our Laravel back-end. This library automatically handles sending the * CSRF token as a header based on the value of the "XSRF" token cookie. */ -axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"; +axios.defaults.headers.common = { + 'Accept': 'application/json, text/plain, */*', + 'X-Requested-With': 'XMLHttpRequest', + 'X-CSRF-TOKEN' : document.querySelector('meta[name="csrf-token"]')!.getAttribute('content') +}; + window.axios = axios; window.bootstrap = bootstrap; diff --git a/webpack.mix.js b/webpack.mix.js index 36efb78..ba000fd 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -76,6 +76,7 @@ mix.ts('resources/ts/back.ts', 'public/js/back.js', { transpileOnly: true }) }) .sass('resources/scss/back.scss', 'public/css/back.css') .polyfill(polyfill) + .version() // .sourceMaps(false) // * FO @@ -87,6 +88,7 @@ mix.ts('resources/ts/front.ts', 'public/js/front.js', { transpileOnly: true }) globalStyles: false }) .polyfill(polyfill) + .version() // .sourceMaps(false) // Copy Blade Images Assets