You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actionForResponsestring// Stores action for response modification
116
105
)
117
106
@@ -141,7 +130,7 @@ func main() {
141
130
ifrequestApiKey=="" {
142
131
requestApiKey=queryParams.Get("key")
143
132
}
144
-
ifrequestApiKey!=envApiKey {
133
+
ifenvApiKey!=""&&requestApiKey!=envApiKey {
145
134
log.Printf("Invalid API key provided in the request.")
146
135
http.Error(w, "Permission denied. Invalid API Key. Configure your SDK to use this URL, and use the API key provided at deployment (https://github.com/google-gemini/gemma-cookbook/blob/main/Demos/Gemma-on-Cloudrun/README.md)", http.StatusForbidden)
log.Printf("Invalid API key provided in the request.")
196
185
http.Error(w, "Permission denied. Invalid API Key. Configure your SDK to use this URL, and use the API key provided at deployment (https://github.com/google-gemini/gemma-cookbook/blob/main/Demos/Gemma-on-Cloudrun/README.md)", http.StatusForbidden)
0 commit comments