b383b11ae2
- 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
23 lines
457 B
Go
23 lines
457 B
Go
package main
|
|
|
|
import (
|
|
_ "embed"
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
//go:embed muplugins/edubox-public-url.php
|
|
var muPluginContent []byte
|
|
|
|
func writeMUPlugin(dataDir string) (string, error) {
|
|
dir := filepath.Join(dataDir, "mu-plugins")
|
|
if err := os.MkdirAll(dir, 0755); err != nil {
|
|
return "", err
|
|
}
|
|
path := filepath.Join(dir, "edubox-public-url.php")
|
|
if err := os.WriteFile(path, muPluginContent, 0644); err != nil {
|
|
return "", err
|
|
}
|
|
return path, nil
|
|
}
|