Closed NicolasCARPi closed 1 week ago
Good catch!
Fetching the mime types was something that I tried when I was trying to make it work in the iframe. It was not the problem, but I forgot to remove it. Thanks for noticing. I removed it now and installed mime@4
from npm.
You don't need to install mime4, you'll want to open a PR on http-server to update it there, because that's what it'll be using.
In any case http-server
is not used (or retained) on the image you will be using. A global http-server
is only used when serving the frontend from the frontend container.
In the container you are using, everything is served with uvicorn (api + frontend).
Hello,
I noticed that the Dockerfile fetches a
mime.types
file from the internet:It is then given as option to
http-server
. Is there a reason for this?http-server
depends on the mime package, albeit an old version (v1 vs current v4), maybe updating this dependency could resolve the need for another one?Another point is that you could maybe use the files in
/usr/share/mime
. Couldn't find one with the same syntax though.You can also use
ADD
instead of installingcurl
to fetch a resource on the internet.Cheers, ~Nico