feat(agent,server): v0.2.7 - mu-plugin WordPress robuste, réparation wp-config, proxy cookies/headers
- Agent: mu-plugin embarqué amélioré (HTTPS forcé, filtres URL, localhost:port) - Agent: suppression des WP_HOME/WP_SITEURL hardcodés au démarrage des instances - Server/proxy: envoi X-Forwarded-Port, réécriture headers/body élargie - Server/proxy: sanitization des Set-Cookie (Secure, SameSite, Domain) - Dashboard: version agent 0.2.7, action Supprimer complète - Cleanup: binaires agent 0.2.3-0.2.6 remplacés par 0.2.7
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
|
||||
|
||||
const AGENT_VERSION = "0.2.3";
|
||||
const AGENT_VERSION = "0.2.7";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
|
||||
@@ -8,11 +8,19 @@ export default function InstanceActions({ instanceId, status }: { instanceId: st
|
||||
|
||||
async function action(type: string) {
|
||||
setLoading(type);
|
||||
await fetch("/api/instances", {
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ id: instanceId, action: type }),
|
||||
});
|
||||
if (type === "delete") {
|
||||
if (!confirm("Voulez-vous vraiment supprimer cette instance ?")) {
|
||||
setLoading(null);
|
||||
return;
|
||||
}
|
||||
await fetch(`/api/instances?id=${instanceId}`, { method: "DELETE" });
|
||||
} else {
|
||||
await fetch("/api/instances", {
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ id: instanceId, action: type }),
|
||||
});
|
||||
}
|
||||
setLoading(null);
|
||||
window.location.reload();
|
||||
}
|
||||
@@ -32,6 +40,9 @@ export default function InstanceActions({ instanceId, status }: { instanceId: st
|
||||
<Button size="sm" variant="outline" onClick={() => action("reset")} disabled={!!loading}>
|
||||
{loading === "reset" ? "..." : "Réinitialiser"}
|
||||
</Button>
|
||||
<Button size="sm" variant="destructive" onClick={() => action("delete")} disabled={!!loading}>
|
||||
{loading === "delete" ? "..." : "Supprimer"}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user