How to set static-web-server to serve file as plain text instead of binary? #476
-
If I copy a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It is probably expected because the library used by SWS cannot guess that extension so it can map its content type. In that situation, SWS falls back to
Yes, you can by using Custom HTTP Headers via a config file. Like this example. my-config.toml [general]
root = "/public"
[advanced]
[[advanced.headers]]
source = "**/*.bpmn"
headers = { Content-Type = "text/plain" } And run SWS like |
Beta Was this translation helpful? Give feedback.
It is probably expected because the library used by SWS cannot guess that extension so it can map its content type. In that situation, SWS falls back to
application/octet-stream
as a "safe-bed".Yes, you can by using Custom HTTP Headers via a config file. Like this example.
my-config.toml