From 017b1813600ed25bf26090d42c6e92b65730bed7 Mon Sep 17 00:00:00 2001 From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com> Date: Mon, 18 May 2020 13:47:34 +0200 Subject: [PATCH] change content into the enedis answer body --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index fa3afd2..2632b2e 100644 --- a/main.go +++ b/main.go @@ -151,6 +151,8 @@ func main() { pageContentString := string(contents) // Replace redirectUri by the host in the body pageContentString = strings.ReplaceAll(pageContentString, redirectUri, replyUri) + // Prevent the closure of the opener + pageContentString = strings.ReplaceAll(pageContentString, "this.window.opener.location.href = url;", "this.window.location.href = url;") fmt.Println(pageContentString) // Convert string to byte for response writting newPageContentByte := []byte(pageContentString) -- GitLab