I am trying to use the InsecureSkipVerify: true
parameter together with the appengine
but the following error appears when executing the dev_appserver.py app.yaml
code:
ERROR 2019-02-02 16:44:49,039 http_runtime.py:420] bad runtime process port ['']
panic: interface conversion: http.RoundTripper is init.failingTransport, not *http.Transport
The port being already built into appengine.Main()
How could I then use InsecureSkipVerify
together with appengine
?
app.yaml
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
main.go
package main
import (
"encoding/json"
"github.com/gorilla/mux"
"net/http"
"google.golang.org/appengine"
"crypto/tls"
)
type Foo struct {
Text string `json:"text"`
}
func GetInfo(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(Foo{"hello"})
}
func init(){
r := mux.NewRouter()
r.HandleFunc("/sample", GetInfo)
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
http.Handle("/", r)
}
func main() {
appengine.Main()
}