umccr / htsget-rs

A server implementation of the htsget protocol for bioinformatics in Rust

Home Page:https://samtools.github.io/hts-specs/htsget.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CORS support for standalone running instance

victorskl opened this issue · comments

Context:

  • A low prior change request: To add direct CORS support for built-in servers for standalone run

Use Case:

  • Local dev run with cargo run -p htsget-http-actix to use htsget-rs as backend in Pipeline development and/or Portal integration with IGV.js

Workaround:

  • Use Nginx/Haproxy to handle CORS then reverse proxy to htsget-rs servers

Need Changes:

I guess, this should be quick -- 2 parts in there:

  • actix_cors crate for actix-web for Ticket server
  • activate tower_http::cors feature in tower/axum for built-in storage streaming server

Closed via #119.