Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use verbb/knock-knock to protect/lock the site #290

Merged
merged 18 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ FRONTEND_DEV=false

ALGOLIA_APP_ID=""
ALGOLIA_API_KEY=""
ALGOLIA_SEARCH_KEY=""
ALGOLIA_SEARCH_KEY=""

SITE_PASSWORD=""
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"verbb/expanded-singles": "2.0.5",
"verbb/formie": "2.1.3",
"verbb/hyper": "^1.1",
"verbb/knock-knock": "^2.0.11",
"verbb/super-table": "3.0.12",
"verbb/tablemaker": "4.0.7",
"vlucas/phpdotenv": "^5.4.1"
Expand Down Expand Up @@ -77,4 +78,4 @@
"canonical": false
}
]
}
}
56 changes: 54 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions config/knock-knock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

return [
'*' => [
'enabled' => false,
'enableCpProtection' => false,
// 'loginPath' => 'knock-knock/who-is-there',
// 'template' => '',
'siteSettings' => [],
'checkInvalidLogins' => false,
'invalidLoginWindowDuration' => '3600',
'maxInvalidLogins' => 10,
'allowIps' => [],
'denyIps' => [],
'useRemoteIp' => false,
'protectedUrls' => [],
'unprotectedUrls' => [],
],
'production' => [
'enabled' => true,
'password' => getenv('SITE_PASSWORD'),
],
'staging' => [
'enabled' => true,
'password' => getenv('SITE_PASSWORD'),

],
'dev' => [
'enabled' => true,
'password' => getenv('SITE_PASSWORD'),
]
];
6 changes: 5 additions & 1 deletion config/project/project.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dateModified: 1706882935
dateModified: 1709215022
elementSources:
craft\elements\Entry:
-
Expand Down Expand Up @@ -639,6 +639,10 @@ plugins:
enabled: true
licenseKey: AHGXAP0SS5F2TGP0ZHPRQIOC
schemaVersion: 1.0.0
knock-knock:
edition: standard
enabled: true
schemaVersion: 1.1.1
navigate:
edition: standard
enabled: true
Expand Down