Skip to content

Commit

Permalink
Merge pull request #153 from akakou/feature/avoid-popup-block
Browse files Browse the repository at this point in the history
Feature/avoid popup block
  • Loading branch information
akakou authored Oct 4, 2024
2 parents 7caa7eb + 81f44ef commit fcac1a3
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions ta/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,11 @@ func main() {
handler := func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")

_, err := r.Cookie("isFirstAccess")

if err != nil {
http.SetCookie(w, &http.Cookie{
Name: "isFirstAccess",
Value: "true",
})

fmt.Fprintln(w, `We open verifier....<br/>`)
fmt.Fprint(w, `<script>`)
for _, v := range config.Verifiers {
fmt.Fprintf(w, `open('%v');`, v+VERIFIER_PATH)
}
fmt.Fprintln(w, `</script>`)
}

fmt.Fprintln(w, "Hello from TA running on TEE :)")

for _, v := range config.Verifiers {
fmt.Fprintf(w, `<button onclick="window.open('%s');">Verifier Page (%s)</button><br>`, v+VERIFIER_PATH, v)
}
}

tlsConfig, err := ta.TLSConfig()
Expand Down

0 comments on commit fcac1a3

Please sign in to comment.