Best way to handle staging site basic auth?
Hi ya'll!
In working with developers who are attempting to integrate 3rd party systems with our Khoros Community platform, one of the first things we encounter is the fact that our Khoros staging site has http basic auth (the popup that appears on the browser when you attempt to access our staging URL) in addition to the Khoros user auth.
I typically recommend that they get through the basic auth in their scripts / Postman via using a staging URL of the format https://basicAuthUsername:basicAuthPassword@[staging-url]
Is this the best way to do it?
Whatever the recommended method is, it would be great if it was added to the Khoros API documentation as it's a very common stumbling block.
Thanks!!
Well, in Postman, instead of putting the auth as a URL, i'd suggest passing it as a header (Authorization Tab, Basic Auth).
Another, less desirable option would be to have HTACCESS removed on stage, and to prevent bots from crawling, add this to the page head content:
<#if config.getString("phase", "prod") == "stage"> <#-- disallow indexing for stage since HTACCESS is disabled --> <meta name="robots" content="noindex,nofollow"> </#if>
Obviously the problem with this is, stage would still be accessible via the broader internet.