1
0
mirror of https://github.com/dkmstr/openuds-gui.git synced 2024-10-26 08:55:23 +03:00

Merge remote-tracking branch 'origin/v3.6'

This commit is contained in:
Adolfo Gómez García 2023-03-25 17:46:03 +01:00
commit 2ee0ecc25f
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23
2 changed files with 6 additions and 5 deletions

View File

@ -4,10 +4,8 @@
"license": "BSD-3-Clause",
"scripts": {
"ng": "ng",
"f4xstart": "ng serve --host 0.0.0.0 --port 9000 --proxy-config proxy.conf.json",
"f4xbuild": "ng build --configuration production --output-hashing=none --aot=false --delete-output-path --build-optimizer=false --deploy-url /uds/res/modern/ --base-href /uds/page && yarn postbuild",
"start": "ng serve --host 0.0.0.0 --port 9000 --proxy-config proxy.conf.json",
"build": "ng build --configuration production --output-hashing=none --aot --delete-output-path --build-optimizer --deploy-url /uds/res/modern/ --base-href /uds/page",
"start": "NODE_OPTIONS=--openssl-legacy-provider ng serve --host 0.0.0.0 --port 9000 --proxy-config proxy.conf.json",
"build": "NODE_OPTIONS=--openssl-legacy-provider ng build --configuration production --output-hashing=none --aot --delete-output-path --build-optimizer --deploy-url /uds/res/modern/ --base-href /uds/page",
"postbuild": "python3 toUDS.py",
"test": "ng test",
"lint": "ng lint",

View File

@ -27,7 +27,10 @@ export class LoginComponent implements OnInit {
form.action = this.api.config.urls.login;
const input = document.getElementById('token') as HTMLInputElement;
input.name = this.api.csrfField;
input.value = this.api.csrfToken;
// Extract csrftoken from cookie
const cookie = document.cookie.split(';').find((c) => c.trim().startsWith('csrftoken='));
input.value = cookie.split('=')[1];
this.auth = document.getElementById('authenticator') as HTMLInputElement;
if (this.auths.length > 0) {