Skip to content

Commit

Permalink
Merge pull request #26 from planetary-social/add-fediverse-users
Browse files Browse the repository at this point in the history
Add fediverse users
  • Loading branch information
mplorentz authored Jan 9, 2025
2 parents eecb6b2 + 838cba1 commit 9852618
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions strfry/plugins/nos_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ const ALLOWED = {
"0403c86a1bb4cfbc34c8a493fbd1f0d158d42dd06d03eaa3720882a066d3a378": true, // Global Sports Center
"a78363acf392e7f6805d9d87654082dd83a02c6c565c804533e62b6f1da3f17d": true, // Alastair Thompson
"b5ad453f5410107a61fde33b0bf7f61832e96b13f8fd85474355c34818a34091": true, // The 74
"2a5ce82d946a0e086f9228f68494f3597e91510c66bd201b442c968cd8381502": true, // Pro Publica
"68ac0f27c0545377ec6e7c5ce6aa2d6ef8aa1edadc6a8c2ffae8eda07f26affc": true, // Robert Reich
"407069c625e86232ae5c5709a6d2c71ef8df24f61d3c57784ca5404cb10229a0": true, // Bill Bennet
"04d1fabc2623f568dc600d7ebb4ea1a13b8ccfdc2c5bca1d955f769f4562e82f": true, // The Spinoff
"d4a5cb6ef3627f22a9ac5486716b8d4dc44270898ef16da75d4ba05754cdbdc5": true, // Dan Slevin
"fd615dad65d0a6ee443f4e49c0da3e26a264f42ea67d694fdceb38e7abeceb28": true, // Lucire
"696736ec91f9b497bf0480f73530abd5c4a3bf8e261cfb23096dd88297a2190f": true, // Taylor Lorenz
"82acde23330b88e6831146a373eee2716c57df3e0054c5187169e92ee0880120": true, // Al Jazeera
},
eventKinds: [
0, // Metadata
Expand Down
3 changes: 2 additions & 1 deletion strfry/plugins/policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { createBroadcastVanishRequests } from "./broadcast_vanish_requests.ts";
import { connect, parseURL } from "https://deno.land/x/redis/mod.ts";

const localhost = "127.0.0.1";
const sync_server = "159.65.45.194"; // sync.nos.social
const redis_url = Deno.env.get("REDIS_URL");
const redis_connect_options = parseURL(redis_url);
const redis = await connect(redis_connect_options);
Expand All @@ -26,7 +27,7 @@ const policies = [
[hellthreadPolicy, { limit: 100 }],
// Async policies
[antiDuplicationPolicy, { ttl: 60000, minLength: 50 }],
[rateLimitPolicy, { whitelist: [localhost] }],
[rateLimitPolicy, { whitelist: [localhost, sync_server] }],
broadcastVanishRequests,
];

Expand Down

0 comments on commit 9852618

Please sign in to comment.