Add Resetera and pubkey fingerprint, and block bots
This commit is contained in:
parent
3804cbe39e
commit
5e368d6e34
11 changed files with 136 additions and 184 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { defineConfig, envField } from "astro/config";
|
||||
import tailwindIntegration from "@astrojs/tailwind";
|
||||
import htaccessIntegration from "astro-htaccess";
|
||||
import { AI_BOTS } from "./src/data/ai_bots";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
|
|
@ -11,6 +12,15 @@ export default defineConfig({
|
|||
}),
|
||||
htaccessIntegration({
|
||||
generateHtaccessFile: import.meta.env.APACHE_CONFIG === "true",
|
||||
customRules: [
|
||||
// Block AI bots
|
||||
"<IfModule mod_rewrite.c>",
|
||||
" RewriteEngine on",
|
||||
" RewriteBase /",
|
||||
` RewriteCond %{HTTP_USER_AGENT} ${AI_BOTS.map((bot) => `^${bot}$`).join("|")} [NC]`,
|
||||
" RewriteRule ^ – [F]",
|
||||
"</IfModule>",
|
||||
],
|
||||
redirects: [
|
||||
{
|
||||
match: /^\/@\/(aryion|ekas?(portal)?)\b/,
|
||||
|
|
@ -124,6 +134,10 @@ export default defineConfig({
|
|||
match: /^\/@\/redd\.?it\b/,
|
||||
url: "https://www.reddit.com/user/BadManners_",
|
||||
},
|
||||
{
|
||||
match: /^\/@\/resetera\b/,
|
||||
url: "https://www.resetera.com/members/bad-manners.181209/",
|
||||
},
|
||||
{
|
||||
match: /^\/@\/signal\b/,
|
||||
url: "https://signal.me/#eu/ytt_rk0fFmAB2JAW-x2PbUiJyc_H3kYmfL_Pq4QNh5QIDsiFtjdFHaqFRs1D36tB",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue