Browse Source

Release 2.171.0-beta.1

release/2.171.0-beta.1 2.171.0-beta.1
Thomas Kaul 2 weeks ago
parent
commit
fcd50a0a76
  1. 2
      CHANGELOG.md
  2. 3
      apps/api/src/app/auth/auth.controller.ts
  3. 19
      apps/api/src/middlewares/html-template.middleware.ts
  4. 4
      package-lock.json
  5. 2
      package.json

2
CHANGELOG.md

@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased ## 2.171.0-beta.1 - 2025-06-14
### Added ### Added

3
apps/api/src/app/auth/auth.controller.ts

@ -9,6 +9,7 @@ import {
Controller, Controller,
Get, Get,
HttpException, HttpException,
Logger,
Param, Param,
Post, Post,
Req, Req,
@ -87,6 +88,8 @@ export class AuthController {
// Handles the Google OAuth2 callback // Handles the Google OAuth2 callback
const jwt: string = (request.user as any).jwt; const jwt: string = (request.user as any).jwt;
Logger.debug(`JWT: ${!!jwt} in google/callback`, 'AuthController');
if (jwt) { if (jwt) {
response.redirect( response.redirect(
`${this.configurationService.get( `${this.configurationService.get(

19
apps/api/src/middlewares/html-template.middleware.ts

@ -83,6 +83,8 @@ export class HtmlTemplateMiddleware implements NestMiddleware {
private indexHtmlMap: { [languageCode: string]: string } = {}; private indexHtmlMap: { [languageCode: string]: string } = {};
public constructor(private readonly i18nService: I18nService) { public constructor(private readonly i18nService: I18nService) {
Logger.debug('Initialize HtmlTemplateMiddleware', 'HtmlTemplateMiddleware');
try { try {
this.indexHtmlMap = SUPPORTED_LANGUAGE_CODES.reduce( this.indexHtmlMap = SUPPORTED_LANGUAGE_CODES.reduce(
(map, languageCode) => ({ (map, languageCode) => ({
@ -104,6 +106,8 @@ export class HtmlTemplateMiddleware implements NestMiddleware {
} }
public use(request: Request, response: Response, next: NextFunction) { public use(request: Request, response: Response, next: NextFunction) {
Logger.debug('use', 'HtmlTemplateMiddleware');
const path = request.originalUrl.replace(/\/$/, ''); const path = request.originalUrl.replace(/\/$/, '');
let languageCode = path.substr(1, 2); let languageCode = path.substr(1, 2);
@ -120,6 +124,17 @@ export class HtmlTemplateMiddleware implements NestMiddleware {
this.isFileRequest(path) || this.isFileRequest(path) ||
!environment.production !environment.production
) { ) {
Logger.debug(`Path: ${path}`, 'HtmlTemplateMiddleware');
Logger.debug(
`Starts with api: ${path.startsWith('/api/')}`,
'HtmlTemplateMiddleware'
);
Logger.debug(
`File request: ${this.isFileRequest(path)}`,
'HtmlTemplateMiddleware'
);
Logger.debug('Skip', 'HtmlTemplateMiddleware');
// Skip // Skip
next(); next();
} else { } else {
@ -146,11 +161,15 @@ export class HtmlTemplateMiddleware implements NestMiddleware {
})}` })}`
}); });
Logger.debug('Send index HTML', 'HtmlTemplateMiddleware');
return response.send(indexHtml); return response.send(indexHtml);
} }
} }
private isFileRequest(filename: string) { private isFileRequest(filename: string) {
Logger.debug(`isFileRequest: ${filename}`, 'HtmlTemplateMiddleware');
if (filename === '/assets/LICENSE') { if (filename === '/assets/LICENSE') {
return true; return true;
} else if ( } else if (

4
package-lock.json

@ -1,12 +1,12 @@
{ {
"name": "ghostfolio", "name": "ghostfolio",
"version": "2.170.0", "version": "2.171.0-beta.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ghostfolio", "name": "ghostfolio",
"version": "2.170.0", "version": "2.171.0-beta.1",
"hasInstallScript": true, "hasInstallScript": true,
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": { "dependencies": {

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "ghostfolio", "name": "ghostfolio",
"version": "2.170.0", "version": "2.171.0-beta.1",
"homepage": "https://ghostfol.io", "homepage": "https://ghostfol.io",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"repository": "https://github.com/ghostfolio/ghostfolio", "repository": "https://github.com/ghostfolio/ghostfolio",

Loading…
Cancel
Save