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

This commit is contained in:
Jon Staab
2026-05-25 14:47:26 -07:00
parent 34d5e732f4
commit ebada70c0d
3 changed files with 7 additions and 7 deletions
+5 -2
View File
@@ -16,7 +16,7 @@ mod web;
use anyhow::Result;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
use tower_http::cors::{AllowOrigin, CorsLayer};
use tower_http::cors::{AllowOrigin, CorsLayer, Any};
use crate::api::Api;
use crate::billing::Billing;
@@ -52,7 +52,10 @@ async fn main() -> Result<()> {
.iter()
.filter_map(|o| o.parse::<axum::http::HeaderValue>().ok())
.collect::<Vec<_>>();
let cors = CorsLayer::new().allow_origin(AllowOrigin::list(parsed));
let cors = CorsLayer::new()
.allow_origin(AllowOrigin::list(parsed))
.allow_methods(Any)
.allow_headers(Any);
let app = api.router().layer(cors);
+1 -4
View File
@@ -11,10 +11,7 @@ pub struct Wallet {
impl Wallet {
pub fn from_url(url: &str) -> Result<Self> {
let url = url
.parse::<NostrWalletConnectURI>()
.map_err(|_| anyhow!("invalid NWC URL"))?;
Ok(Self { url })
Ok(Self { url: url.parse::<NostrWalletConnectURI>()? })
}
pub async fn make_invoice(
+1 -1
View File
@@ -92,7 +92,7 @@ export default function Home() {
<h1 class="text-5xl sm:text-6xl font-extrabold tracking-tight text-gray-900 mb-6 leading-tight">
Your community,<br />
<span class="text-blue-600">your relay.</span>
<span class="text-blue-600">your server.</span>
</h1>
<p class="text-xl text-gray-500 mb-10 max-w-2xl mx-auto leading-relaxed">