feat: Engine-Oberfläche: Seite mit refresh statt 303, Browserprüfung 12 von 12, Klicktests, Berichte, README, Roadmap (#1101)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -4627,16 +4627,22 @@ async fn engine_ui_start(gw: &Gateway) -> String {
|
||||
}
|
||||
|
||||
/// Öffnet die Oberfläche über den Knopf (POST mit CSRF) und liefert die Adresse der zweiten Herkunft mit Token.
|
||||
/// Die Antwort ist eine Seite mit `refresh` und Verweis (keine 303, → Content-Security-Policy `form-action 'self'`).
|
||||
async fn oberflaeche_oeffnen(gw: &Gateway, cookie: &str, csrf: &str) -> String {
|
||||
let (status, location, _) = ui_post(
|
||||
let (status, location, seite) = ui_post(
|
||||
gw,
|
||||
"/ui/engine/llama.cpp/oeffnen",
|
||||
cookie,
|
||||
&format!("csrf={csrf}"),
|
||||
)
|
||||
.await;
|
||||
assert_eq!(status, 303);
|
||||
location.expect("Weiterleitung zur Oberfläche")
|
||||
assert_eq!((status, location), (200, None));
|
||||
assert!(seite.contains("http-equiv=\"refresh\""));
|
||||
let ab = seite
|
||||
.split("<a href=\"")
|
||||
.nth(1)
|
||||
.expect("Verweis auf die Oberfläche");
|
||||
ab.split('"').next().unwrap().replace("&", "&")
|
||||
}
|
||||
|
||||
/// Anfrage an die zweite Herkunft **ohne** Cookie, wie es der Browser dort tut (das Cookie des Gateways gilt nur
|
||||
|
||||
Reference in New Issue
Block a user