Fix nip98
Docker / build-and-push-image (backend, backend, coracle/caravel-backend) (push) Failing after 0s
Docker / build-and-push-image (frontend, frontend, coracle/caravel-frontend) (push) Failing after 0s

This commit is contained in:
Jon Staab
2026-06-01 13:31:00 -07:00
parent e4e0172972
commit 9171824ee5
6 changed files with 11 additions and 14 deletions
+1 -2
View File
@@ -1,9 +1,8 @@
# Server
SERVER_HOST=127.0.0.1
SERVER_URL=http://127.0.0.1:2892
SERVER_PORT=2892
SERVER_ALLOW_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
SERVER_ADMIN_PUBKEYS=
APP_URL=http://localhost:5173
# Database
DATABASE_URL=sqlite://data/caravel.db
+2 -2
View File
@@ -174,7 +174,7 @@ impl Api {
ensure!(event.kind == Kind::HttpAuth, "invalid nip98 kind");
event.verify()?;
let got_u = event
let actual_u = event
.tags
.iter()
.filter_map(|tag| {
@@ -185,7 +185,7 @@ impl Api {
.ok_or_else(|| anyhow!("missing u tag"))?;
ensure!(
got_u == env::get().server_host,
actual_u == env::get().server_url,
"authorization host mismatch"
);
+2 -2
View File
@@ -21,7 +21,7 @@ pub fn get() -> &'static Env {
#[derive(Clone)]
pub struct Env {
pub server_host: String,
pub server_url: String,
pub server_port: u16,
pub server_admin_pubkeys: Vec<String>,
pub server_allow_origins: Vec<String>,
@@ -55,7 +55,7 @@ impl Env {
.expect("ROBOT_SECRET is not a valid nostr secret key");
Self {
server_host: require_str("SERVER_HOST"),
server_url: require_str("SERVER_URL"),
server_port: require_u16("SERVER_PORT"),
server_admin_pubkeys: require_csv("SERVER_ADMIN_PUBKEYS"),
server_allow_origins: require_csv("SERVER_ALLOW_ORIGINS"),
+4 -6
View File
@@ -61,12 +61,10 @@ async fn main() -> Result<()> {
billing.start().await;
});
let listener = tokio::net::TcpListener::bind(format!(
"{}:{}",
env::get().server_host,
env::get().server_port
))
.await?;
let url = format!("127.0.0.1:{}", env::get().server_port);
let listener = tokio::net::TcpListener::bind(url).await?;
axum::serve(listener, app).await?;
Ok(())
}
+1 -1
View File
@@ -116,7 +116,7 @@ export const createRelayForActiveTenant = (input: CreateRelayInput) => {
}
const overrides = {
tenant: account()!.pubkey,
tenant_pubkey: account()!.pubkey,
blossom_enabled: input.plan_id === "free" ? 0 : 1,
livekit_enabled: input.plan_id === "free" ? 0 : 1,
}
+1 -1
View File
@@ -16,7 +16,7 @@ export default function AdminRelayList() {
const list = relays() ?? []
const q = query().trim()
if (!q) return list
return new Fuse(list, { keys: ["info_name", "subdomain", "tenant"], threshold: 0.35, ignoreLocation: true }).search(q).map(r => r.item)
return new Fuse(list, { keys: ["info_name", "subdomain", "tenant_pubkey"], threshold: 0.35, ignoreLocation: true }).search(q).map(r => r.item)
})
return (