appEngine静态文件mime type override
,静态文件处理程序有时可以覆盖正确的mime类型,在错误消息中导致错误消息:“无法猜测mimeType for for file for file for [File]。 application/application/octet-stream ...“ 使用“ mime_type”,而不是“ http_headers”
:在您的app.yaml配置文件中,更改“ http_headers”指令“ http_headers”的“ mime_type”,以解决问题。例如,为.otf文件指定MIME类型:- url:/home/font/(.* \ .otf) static_files:home/font/\ 1 上传:主/字体/(。*\。otf) mime_type:application/x-font-otf
example app.yaml configuration 以下app.yaml configuration演示了“ mime_type”的正确使用 版本:0 运行时:去 ... 处理者: - url:/home/font/(.* \ .otf) static_files:home/font/\ 1 上传:主/字体/(。*\。otf) mime_type:application/x-font-otf ... 附加资源[&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& appengine documentation:https://develovelers.google.com/appengine/docs/docs/python/python/python/python/config-conconfig/appconf.python_app-pypython_app-pypython_app_yaml_yaml_yaml_yaml_static_yaml_sstatic_ymlel_handerasustr [
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3