You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you have any tips to troubleshoot this not working on staging?
Additional context
We use Knock Knock on a host of sites to protect access on our staging server. All to date have been working great with no issue. I have a redesign site that we recently pushed to staging for review and Knock Knock is not working on staging. There are no errors and I'm a little baffled by it. There is a single site.
I am using the config copied direct from the docs.
Locally my .env is set to dev.
ENVIRONMENT=dev
When i change my knock-knock.php config to the following:
'dev' => [ 'enabled' => true, ],
The site is properly locked. Yeah!
When I change config back to:
'staging' => [ 'enabled' => true, ],
and then update my .env to:
ENVIRONMENT=staging
The site is not locked. Boo!
This in essence is what I am seeing on my actual staging server. Struggling to find a cause so thought I'd reach out for troubleshooting advice.
The text was updated successfully, but these errors were encountered:
Can't think of a reason why that wouldn't work (it's working for me with that reduced case. Only thing worth considering is that if you're logged in, it'll bypass the challenge screen?
I'd also just double check all your other Knock Knock settings just in case.
Not sure if relevant in this case, but thought I'd mention it in case it is:
I had the issue with knock knock not locking a page in production, but working fine locally.
The reasoning was that the BASE_URL was not the same as the accessed url.
Specifically I was hosting the site at Fortrabbit, and had previously used their given url projectname.frb.io, and only recently routed the correct domain. Thereafter I had added a htaccess redirect from the frb.io domain to the actual domain, but forgotten to change the BASE_URL.
Obviously an error on my side, but worth mentioning just in case someone else also do the same 🙂
Question
Do you have any tips to troubleshoot this not working on staging?
Additional context
We use Knock Knock on a host of sites to protect access on our staging server. All to date have been working great with no issue. I have a redesign site that we recently pushed to staging for review and Knock Knock is not working on staging. There are no errors and I'm a little baffled by it. There is a single site.
I am using the config copied direct from the docs.
Locally my .env is set to dev.
ENVIRONMENT=dev
When i change my knock-knock.php config to the following:
'dev' => [ 'enabled' => true, ],
The site is properly locked. Yeah!
When I change config back to:
'staging' => [ 'enabled' => true, ],
and then update my .env to:
ENVIRONMENT=staging
The site is not locked. Boo!
This in essence is what I am seeing on my actual staging server. Struggling to find a cause so thought I'd reach out for troubleshooting advice.
The text was updated successfully, but these errors were encountered: