Secure admin api using basic auth and gets CORS policy error on kong manager

Hello,

Since, We can’t enable login page on kong manager as it is the license enterprise feature according to kong documentation. So i tried to secure admin api by adding it as kong route and accessing it by kongProxy/admin and using basic auth or key auth.

I have added the admin url in env variable as
admin_api_uri: http://user: password@kong-proxy.com/admin

So i got error of CORs policy that access control alllow origin not enabled.
To resolve that i enabled the cors policy plugin on the kong route (/admin)

Later, i got error as 401 unauthorised
I have checked the password and also have tried using curl commands. So the password is correct but somehow it gives 401 status
.
Later i enabled the file-log plugin to check logs and i noticed that the uri and strip path are separated because of the credentials are not getting added.

So could you please share any other ways to pass credentials.

I’m installing kong using helm chart kong/kong and using enterprise free mode, trying to secure admin api to use kong manager.

Thankyou.