Detect expired session only via login page markup

The session check treated any response containing "Anmeldung" or
"Einloggen" as an expired session. Regular content pages (e.g. the FAQ)
mention these words in body text, which triggered a needless re-login and
returned the login page instead of the requested content.

Detection now relies on the status code and isLoginPageText() alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-07 17:36:05 +02:00
co-authored by Claude Opus 5
parent f83830dedf
commit b844b772b8
5 changed files with 113 additions and 8 deletions
+1 -3
View File
@@ -731,9 +731,7 @@ export class AgrarmonitorConnector implements AgrarmonitorConnectorResult {
return (
response.status === 401 ||
response.status === 403 ||
this.isLoginPageText(responseText) ||
responseText.includes('Anmeldung') ||
responseText.includes('Einloggen')
this.isLoginPageText(responseText)
);
}