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:
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user