caddy: Proxying to an internal resource using `internal` and `proxy` does not serve the correct MIME type
1. What version of Caddy are you running (caddy -version)?
0.9.1
2. What are you trying to do?
Proxy access to a static file using the internal and proxy directives.
3. What is your entire Caddyfile?
localhost:2020
internal /css
proxy /redirect http://localhost:8000
4. How did you run Caddy (give the full command and describe the execution environment)?
caddy, on OSX.
5. What did you expect to see?
Expected /redirect to serve /css/style.css with a mime type of text/css.
6. What did you see instead (give full error messages and/or log)?
/css/style.css served with a mime type of text/html, causing CSS to not be parsed.
7. How can someone who is starting from scratch reproduce this behavior as minimally as possible?
Clone this repository and follow the instructions in the readme:
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (7 by maintainers)
Commits related to this issue
- proxy: don't append predefined headers fix issue #1086 Signed-off-by: Tw <tw19881113@gmail.com> — committed to tw4452852/caddy by tw4452852 8 years ago
- proxy: don't append predefined headers fix issue #1086 Signed-off-by: Tw <tw19881113@gmail.com> — committed to tw4452852/caddy by tw4452852 8 years ago
- proxy: don't append predefined headers fix issue #1086 Signed-off-by: Tw <tw19881113@gmail.com> — committed to tw4452852/caddy by tw4452852 8 years ago
- proxy: don't append some predefined headers fix issue #1086 Signed-off-by: Tw <tw19881113@gmail.com> — committed to tw4452852/caddy by tw4452852 8 years ago
- proxy: don't append some predefined headers fix issue #1086 Signed-off-by: Tw <tw19881113@gmail.com> — committed to tw4452852/caddy by tw4452852 8 years ago
- proxy: don't append some predefined headers fix issue #1086 Signed-off-by: Tw <tw19881113@gmail.com> — committed to tw4452852/caddy by tw4452852 8 years ago
- proxy: don't append some predefined headers fix issue #1086 Signed-off-by: Tw <tw19881113@gmail.com> — committed to tw4452852/caddy by tw4452852 8 years ago
- proxy: don't append some predefined headers fix issue #1086 Signed-off-by: Tw <tw19881113@gmail.com> — committed to elcore/caddy by tw4452852 8 years ago
I think this issue is due to we append header when
copyHeadersin proxy, will figure out a proper way to handle this case.