Compare commits

..

No commits in common. "a3a1338c28f662199cb9bfcf8e22bf50e5ba5c48" and "ea595b39a7cce406edd5289185fe9c2f4ff0c421" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View file

@ -25,10 +25,11 @@ pub async fn serve(ctx: upub::Context, bind: String) -> upub::Result<()> {
use tower_http::{cors::CorsLayer, trace::TraceLayer}; use tower_http::{cors::CorsLayer, trace::TraceLayer};
let router = axum::Router::new() let router = axum::Router::new()
.layer(CorsLayer::permissive())
.layer( .layer(
// TODO 4xx errors aren't really failures but since upub is in development it's useful to log // TODO 4xx errors aren't really failures but since upub is in development it's useful to log
// these too, in case something's broken // these too, in case something's broken
TraceLayer::new(SharedClassifier::new(StatusInRangeAsFailures::new(300..=999))) TraceLayer::new(SharedClassifier::new(StatusInRangeAsFailures::new(300..=u16::MAX)))
.make_span_with(|req: &axum::http::Request<_>| { .make_span_with(|req: &axum::http::Request<_>| {
tracing::span!( tracing::span!(
tracing::Level::INFO, tracing::Level::INFO,
@ -38,7 +39,6 @@ pub async fn serve(ctx: upub::Context, bind: String) -> upub::Result<()> {
) )
}) })
) )
.layer(CorsLayer::permissive())
.ap_routes() .ap_routes()
.mastodon_routes() // no-op if mastodon feature is disabled .mastodon_routes() // no-op if mastodon feature is disabled
.with_state(ctx); .with_state(ctx);

View file

@ -76,10 +76,10 @@ pub fn ConfigPage(setter: WriteSignal<crate::Config>) -> impl IntoView {
let mut val = event_target_value(&ev); let mut val = event_target_value(&ev);
if val.is_empty() { val = DEFAULT_COLOR.to_string() }; if val.is_empty() { val = DEFAULT_COLOR.to_string() };
let mut mock = config.get(); let mut mock = config.get();
set_color_rgb.set(parse_hex(&val)); mock.accent_color = val.clone();
set_color.set(val.clone());
mock.accent_color = val;
setter.set(mock); setter.set(mock);
set_color_rgb.set(parse_hex(&val));
set_color.set(val);
} /> } />
</p> </p>
<hr /> <hr />