Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions packages/fullstack/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,16 +374,7 @@ impl RenderHandleState {
pub async fn render_handler(
State(state): State<RenderHandleState>,
request: Request<Body>,
) -> impl IntoResponse {
// Only respond to requests for HTML
if let Some(mime) = request.headers().get("Accept") {
let mime = mime.to_str().map(|mime| mime.to_ascii_lowercase());
match mime {
Ok(accepts) if accepts.contains("text/html") => {}
_ => return Err(StatusCode::NOT_ACCEPTABLE),
}
}

) -> Result<http::Response<axum::body::Body>, StatusCode> {
let cfg = &state.config;
let ssr_state = state.ssr_state();
let build_virtual_dom = {
Expand Down
Loading