How do one conditionally apply authentication in k...
# ktor
f
How do one conditionally apply authentication in ktor? 😛 I want to skip it in development since I do not send
basic
auth headers then
z
Auth is one of those things that I'm scared to put an on/off switch on. Wouldn't you rather just have a hard coded user/pass for your dev environment?
🤔 1
f
the thing is that I serve a spa staticly with ktor in prod but in dev I just run a webpack server that talks to ktor running on another port. So I never get the basic auth prompt since its not ktor that is serving the stuff, only the REST calls fails instead
a
how about an if statement ?
if (prod) install(auth) ...