@@ -73,7 +73,6 @@ func (a *amplifyAPI) GetV0(w http.ResponseWriter, r *http.Request) {
73
73
fallthrough
74
74
case "application/vnd.api+json" :
75
75
w .Header ().Set ("Content-Type" , "application/vnd.api+json" )
76
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
77
76
err := json .NewEncoder (w ).Encode (home )
78
77
if err != nil {
79
78
sendError (r .Context (), w , http .StatusInternalServerError , "Could not render JSON" , err .Error ())
@@ -102,7 +101,6 @@ func (a *amplifyAPI) GetV0Jobs(w http.ResponseWriter, r *http.Request) {
102
101
fallthrough
103
102
case "application/vnd.api+json" :
104
103
w .Header ().Set ("Content-Type" , "application/vnd.api+json" )
105
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
106
104
err := json .NewEncoder (w ).Encode (jobs )
107
105
if err != nil {
108
106
sendError (r .Context (), w , http .StatusInternalServerError , "Could not render JSON" , err .Error ())
@@ -135,7 +133,6 @@ func (a *amplifyAPI) GetV0JobsId(w http.ResponseWriter, r *http.Request, id stri
135
133
fallthrough
136
134
case "application/vnd.api+json" :
137
135
w .Header ().Set ("Content-Type" , "application/vnd.api+json" )
138
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
139
136
err := json .NewEncoder (w ).Encode (j )
140
137
if err != nil {
141
138
sendError (r .Context (), w , http .StatusInternalServerError , "Could not render JSON" , err .Error ())
@@ -178,7 +175,6 @@ func (a *amplifyAPI) GetV0Queue(w http.ResponseWriter, r *http.Request, params G
178
175
fallthrough
179
176
case "application/vnd.api+json" :
180
177
w .Header ().Set ("Content-Type" , "application/vnd.api+json" )
181
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
182
178
err := json .NewEncoder (w ).Encode (executions )
183
179
if err != nil {
184
180
sendError (r .Context (), w , http .StatusInternalServerError , "Could not render JSON" , err .Error ())
@@ -211,7 +207,6 @@ func (a *amplifyAPI) GetV0QueueId(w http.ResponseWriter, r *http.Request, id ope
211
207
fallthrough
212
208
case "application/vnd.api+json" :
213
209
w .Header ().Set ("Content-Type" , "application/vnd.api+json" )
214
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
215
210
err := json .NewEncoder (w ).Encode (e )
216
211
if err != nil {
217
212
sendError (r .Context (), w , http .StatusInternalServerError , "Could not render JSON" , err .Error ())
@@ -230,7 +225,6 @@ func (a *amplifyAPI) GetV0QueueId(w http.ResponseWriter, r *http.Request, id ope
230
225
// (PUT /v0/queue/{id})
231
226
func (a * amplifyAPI ) PutV0QueueId (w http.ResponseWriter , r * http.Request , id openapi_types.UUID ) {
232
227
log .Ctx (r .Context ()).Trace ().Str ("id" , id .String ()).Msg ("PutV0QueueId" )
233
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
234
228
var body ExecutionRequest
235
229
switch r .Header .Get ("Content-Type" ) {
236
230
case "application/json" :
@@ -255,7 +249,6 @@ func (a *amplifyAPI) PutV0QueueId(w http.ResponseWriter, r *http.Request, id ope
255
249
func (a * amplifyAPI ) PostV0Queue (w http.ResponseWriter , r * http.Request ) {
256
250
log .Ctx (r .Context ()).Trace ().Msg ("PostV0Queue" )
257
251
var body ExecutionRequest
258
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
259
252
switch r .Header .Get ("Content-Type" ) {
260
253
case "application/x-www-form-urlencoded" :
261
254
err := r .ParseForm ()
@@ -340,7 +333,6 @@ func (a *amplifyAPI) GetV0Graph(w http.ResponseWriter, r *http.Request) {
340
333
fallthrough
341
334
case "application/vnd.api+json" :
342
335
w .Header ().Set ("Content-Type" , "application/vnd.api+json" )
343
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
344
336
err := json .NewEncoder (w ).Encode (outputGraph )
345
337
if err != nil {
346
338
sendError (r .Context (), w , http .StatusInternalServerError , "Could not render JSON" , err .Error ())
@@ -604,7 +596,6 @@ func sendError(ctx context.Context, w http.ResponseWriter, statusCode int, userE
604
596
Detail : & devErr ,
605
597
}
606
598
w .Header ().Set ("Content-Type" , "application/vnd.api+json" )
607
- w .Header ().Set ("Access-Control-Allow-Origin" , "*" )
608
599
w .WriteHeader (statusCode )
609
600
err := json .NewEncoder (w ).Encode (& Errors {e })
610
601
if err != nil {
0 commit comments