Skip to content
Permalink
Browse files
Bug 26832: Allow cross-origin use of check.tpo/api/ip
Allow the JSON data at https://check.torproject.org/api/ip
to be fetched by a script in a web page or embedded in an
iframe.
  • Loading branch information
arthuredelstein committed Jul 17, 2018
1 parent c6a8219 commit ddd0f2d339ec91af1cdaa48ec199b05103792adc
Showing with 2 additions and 0 deletions.
  1. +2 −0 handlers.go
@@ -103,6 +103,8 @@ type IPResp struct {
func APIHandler(Exits *Exits) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Del("X-Frame-Options")
var (
err error
isTor bool

0 comments on commit ddd0f2d

Please sign in to comment.