Using key-auth and session plugins together

I am new to Kong and have a setup with the key-auth plugin enabled. So when I go to https://localhost:32443 I get {"message":"No API key found in request"} . If I specify an apikey I get the homepage of the application but it is blank. The first request succeeds with a 200 response - https://localhost:32443/?apikey=EMCmOc4oE3KjE3CtCoqqDZ9cBM8mEJWjDcOuPJLXPZCmOJbb - because it includes ‘apikey’. All subsequent requests that the page makes to download minified JS and CSS fail with 401 because they don’t include the ‘apikey’. I have tried to configure the application to use the’session’ plugin but not sure if this is the right thing to do or I just haven’t configured it correctly.

Request URL: https://localhost:32443/favicon.ico
Request Method: GET
Status Code: 401 
Remote Address:
Referrer Policy: no-referrer-when-downgrade
content-length: 41
content-type: application/json; charset=utf-8
date: Sun, 06 Sep 2020 07:32:32 GMT
server: kong/2.0.4
status: 401
www-authenticate: Key realm="kong"
x-kong-response-latency: 1
:authority: localhost:32443
:method: GET
:path: /favicon.ico
:scheme: https
accept: image/avif,image/webp,image/apng,image/*,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cookie: session_2=dhhdjdjdjjd...
referer: https://localhost:32443/?apikey=EMCmOc4oE3KjE3CtCoqqDZ9cBM8mEJWjDcOuPJLXPZCmOJbb
sec-fetch-dest: image
sec-fetch-mode: no-cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/85.0.4183.83 Safari/537.36

If I manually add the ‘apikey’ to the favicon request in a new tab then it loads fine. I’m not sure if there is configuration that I am missing that will automatically do this for all requests?

Many thanks

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ