File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed
internals/proxy/middlewares Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ func (data BodyMiddleware) Use() http.Handler {
2020 next := data .Next
2121
2222 return http .HandlerFunc (func (w http.ResponseWriter , req * http.Request ) {
23- messageAliases := GetSettings (req ).MESSAGE_ALIASES
23+ messageAliases := getSettings (req ).MESSAGE_ALIASES
2424
2525 body , err := request .GetReqBody (w , req )
2626
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ type contextKey string
2323
2424const tokenKey contextKey = "token"
2525
26- func GetSettings (req * http.Request ) config.SETTING_ {
26+ func getSettings (req * http.Request ) config.SETTING_ {
2727 token := req .Context ().Value (tokenKey ).(string )
2828
2929 settings := config .ENV .SETTINGS [token ]
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ func (data EndpointsMiddleware) Use() http.Handler {
1515 next := data .Next
1616
1717 return http .HandlerFunc (func (w http.ResponseWriter , req * http.Request ) {
18- blockedEndpoints := GetSettings (req ).BLOCKED_ENDPOINTS
18+ blockedEndpoints := getSettings (req ).BLOCKED_ENDPOINTS
1919
2020 reqPath := req .URL .Path
2121
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ func (data TemplateMiddleware) Use() http.Handler {
2222 next := data .Next
2323
2424 return http .HandlerFunc (func (w http.ResponseWriter , req * http.Request ) {
25- variables := GetSettings (req ).VARIABLES
25+ variables := getSettings (req ).VARIABLES
2626
2727 body , err := request .GetReqBody (w , req )
2828
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
1010
1111type TOKEN_CONFIG_ struct {
1212 TOKENS []string `koanf:"tokens"`
13- OVERRIDES * SETTING_ `koanf:"overrides"`
13+ OVERRIDES SETTING_ `koanf:"overrides"`
1414}
1515
1616func LoadTokens () {
@@ -35,7 +35,7 @@ func InitTokens() {
3535 for token , override := range overrides {
3636 apiTokens = append (apiTokens , token )
3737
38- ENV .SETTINGS [token ] = override
38+ * ENV .SETTINGS [token ] = override
3939 }
4040
4141 if len (apiTokens ) <= 0 {
@@ -57,8 +57,8 @@ func InitTokens() {
5757 }
5858}
5959
60- func ParseTokenConfigs (configs []TOKEN_CONFIG_ ) (map [string ]* SETTING_ ) {
61- settings := map [string ]* SETTING_ {}
60+ func ParseTokenConfigs (configs []TOKEN_CONFIG_ ) (map [string ]SETTING_ ) {
61+ settings := map [string ]SETTING_ {}
6262
6363 for _ , config := range configs {
6464 for _ , token := range config .TOKENS {
You can’t perform that action at this time.
0 commit comments