Finished NIP42 implementation
This commit is contained in:
parent
f7b74bd22c
commit
d06206bb24
8 changed files with 101 additions and 17 deletions
|
@ -41,6 +41,10 @@ in {
|
|||
Local nixos-container ip address
|
||||
'';
|
||||
};
|
||||
relayUrl = mkOption {
|
||||
type = types.str;
|
||||
description = "Relay URL that will be used for NIP-42 AUTH validation";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -70,6 +74,7 @@ in {
|
|||
DATABASE_URL = "${DB_PATH}/sneedstr.db";
|
||||
ADMIN_PUBKEY = cfg.adminPubkey;
|
||||
CONFIG_ENABLE_AUTH = cfg.enableAuth;
|
||||
CONFIG_RELAY_URL = cfg.relayUrl;
|
||||
};
|
||||
startLimitBurst = 1;
|
||||
startLimitIntervalSec = 10;
|
||||
|
@ -117,6 +122,10 @@ in {
|
|||
proxyWebsockets = true; # needed if you need to use WebSocket
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
locations."/register" = {
|
||||
proxyPass = "http://${cfg.localAddress}:8085";
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue