@lamalibre/create-portlama 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -220,7 +220,13 @@ export async function writeAutheliaConfig(domain, secrets) {
|
|
|
220
220
|
session: {
|
|
221
221
|
name: 'portlama_session',
|
|
222
222
|
secret: sessionSecret,
|
|
223
|
-
|
|
223
|
+
cookies: [
|
|
224
|
+
{
|
|
225
|
+
domain: domain,
|
|
226
|
+
authelia_url: `https://auth.${domain}`,
|
|
227
|
+
default_redirection_url: `https://auth.${domain}`,
|
|
228
|
+
},
|
|
229
|
+
],
|
|
224
230
|
expiration: '12h',
|
|
225
231
|
inactivity: '2h',
|
|
226
232
|
},
|
|
@@ -450,6 +456,20 @@ export async function updateAccessControl(sites) {
|
|
|
450
456
|
throw new Error('Authelia configuration is empty or invalid');
|
|
451
457
|
}
|
|
452
458
|
|
|
459
|
+
// Migrate session config from old format (session.domain) to new format (session.cookies)
|
|
460
|
+
// needed for Authelia 4.38+
|
|
461
|
+
if (currentConfig.session && currentConfig.session.domain && !currentConfig.session.cookies) {
|
|
462
|
+
const oldDomain = currentConfig.session.domain;
|
|
463
|
+
currentConfig.session.cookies = [
|
|
464
|
+
{
|
|
465
|
+
domain: oldDomain,
|
|
466
|
+
authelia_url: `https://auth.${oldDomain}`,
|
|
467
|
+
default_redirection_url: `https://auth.${oldDomain}`,
|
|
468
|
+
},
|
|
469
|
+
];
|
|
470
|
+
delete currentConfig.session.domain;
|
|
471
|
+
}
|
|
472
|
+
|
|
453
473
|
// Build access_control rules from protected sites.
|
|
454
474
|
//
|
|
455
475
|
// Authelia evaluates rules top-to-bottom, first match wins.
|
|
@@ -190,7 +190,7 @@ export async function writeAppVhost(subdomain, domain, port, certPath) {
|
|
|
190
190
|
# Authelia forward authentication
|
|
191
191
|
location /authelia {
|
|
192
192
|
internal;
|
|
193
|
-
proxy_pass http://127.0.0.1:9091/api/
|
|
193
|
+
proxy_pass http://127.0.0.1:9091/api/authz/forward-auth;
|
|
194
194
|
proxy_pass_request_body off;
|
|
195
195
|
proxy_set_header Content-Length "";
|
|
196
196
|
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
|
|
@@ -318,7 +318,7 @@ export async function writeStaticSiteVhost(site, certDir, domain) {
|
|
|
318
318
|
# Authelia forward authentication
|
|
319
319
|
location /authelia {
|
|
320
320
|
internal;
|
|
321
|
-
proxy_pass http://127.0.0.1:9091/api/
|
|
321
|
+
proxy_pass http://127.0.0.1:9091/api/authz/forward-auth;
|
|
322
322
|
proxy_pass_request_body off;
|
|
323
323
|
proxy_set_header Content-Length "";
|
|
324
324
|
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
|