Header parameter for apikey

#1

Hello,
I see that I can pass a header with apikey to authenticate. Is there a way to change the header param name, so instead of apikey=actual_key I can pass my-api-key=actual_key?

0 Likes

#2

Yes, you can add another name to the plugin default value.

curl -i -X POST --url http://localhost:8001/plugins/ \
                --data "name=key-auth" \
                --data "config.key_names[]=yourApiKeyName"
0 Likes