()
| 26 | } |
| 27 | |
| 28 | func newOpenapiCheck() *openapiCheck { |
| 29 | apikey, has := env.GetEnv("API_KEY") |
| 30 | if !has { |
| 31 | apikey = defaultAPIKey |
| 32 | } |
| 33 | p := &openapiCheck{apikey: apikey} |
| 34 | autowire.Autowired(p) |
| 35 | return p |
| 36 | } |
| 37 | |
| 38 | func (o *openapiCheck) Check(method string, path string) (bool, []gin.HandlerFunc) { |
| 39 | if strings.HasPrefix(path, "/openapi/") { |