File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ type kongConfig struct {
87
87
ApiHost string
88
88
ApiPort uint16
89
89
BearerToken string
90
+ QueryToken string
90
91
}
91
92
92
93
var (
362
363
utils .Config .Auth .PublishableKey .Value ,
363
364
utils .Config .Auth .AnonKey .Value ,
364
365
),
366
+ QueryToken : fmt .Sprintf (
367
+ `$((function() return (query_params.apikey == '%s' and '%s') or (query_params.apikey == '%s' and '%s') or query_params.apikey end)())` ,
368
+ utils .Config .Auth .SecretKey .Value ,
369
+ utils .Config .Auth .ServiceRoleKey .Value ,
370
+ utils .Config .Auth .PublishableKey .Value ,
371
+ utils .Config .Auth .AnonKey .Value ,
372
+ ),
365
373
}); err != nil {
366
374
return errors .Errorf ("failed to exec template: %w" , err )
367
375
}
Original file line number Diff line number Diff line change @@ -132,9 +132,9 @@ services:
132
132
- name : request-transformer
133
133
config :
134
134
replace :
135
- headers :
136
- - " Authorization: {{ .BearerToken }}"
137
- - name : realtime-v1-longpoll
135
+ querystring :
136
+ - " apikey: {{ .QueryToken }}"
137
+ - name : realtime-v1-longpoll-not-working
138
138
_comment : " Realtime: /realtime/v1/* -> ws://realtime:4000/socket/longpoll"
139
139
url : http://{{ .RealtimeId }}:4000/socket
140
140
protocol : http
You can’t perform that action at this time.
0 commit comments