http-server
http-server copied to clipboard
Cross origin isolation option
--coiso
flag can send coop and coep headers, Which useful for webassembly thread enabling.
More info about coop and coep
There are a handful of PRs implementing custom headers (which I need to consolidate). If custom headers could be specified, would that achieve this?
Somehow.
This is the future security standard, something like secure context, and many features of browser will be depend on this. Custom headers would make it possible but annoying, amount of annoyance depend on custom header proposal, for example long cli flags are really annoying.
Even better than a special cli flag like --coiso
or --coop
, would be making it default. It seems that majority of websites should adopt this (again, like secure context) and broken cases are rare (the most common one is oauth pop-up) so making it default is a valid move (Surely with a --no-coiso
for disabling it). But it will be a breaking change and this is enough for not doing it. In this case I think this is common enough and worth a special flag (like existing -c
and --cors
flags that have special flags)
This issue has been inactive for 180 days
It is still a problem to be solved. There are two PR for it but still not merged.
This issue has been inactive for 180 days
For people just needing a solution now, try npx statikk --port 8000 --coi
.
ugh, i posted a 3rd PR for this issue. can someone please look at merging one of them ?
Seconded. This is an essential feature for my use-case.
By the way, https://github.com/weihanglo/sfz supports this.
unfortunately sfz isn't in npm and is written in Rust, so integrating it into existing web stacks isn't really feasible
You can download the binary from their release page and execute it. It doesn't need installing whole rust toolchain.
that requires manually tracking their releases file names, OS versions, etc... i guess technically it makes it feasible, but it's way more effort than a normal npm package