在測試服務器上goapp serv它可以工作,在 appengine 本身上它會被 application/octet-stream 覆蓋。我怎樣才能告訴 appengine 停止這樣做?Could not guess mimetype for home/fonts/FontAwesome.otf. Using application/octet-stream...我的配置文件:application: testversion: 0runtime: goapi_version: go1threadsafe: truehandlers: - url: /home static_dir: home - url: /home/font/(.*\.woff) static_files: home/font/\1 upload: home/font/(.*\.woff) http_headers: Content-Type: application/font-woff - url: /home/font/(.*\.svg) static_files: home/font/\1 upload: home/font/(.*\.svg) http_headers: Content-Type: image/svg+xml - url: /home/font/(.*\.eot) static_files: home/font/\1 upload: home/font/(.*\.eot) http_headers: Content-Type: application/vnd.ms-fontobject - url: /home/font/(.*\.ttf) static_files: home/font/\1 upload: home/font/(.*\.ttf) http_headers: Content-Type: application/x-font-ttf - url: /home/font/(.*\.otf) static_files: home/font/\1 upload: home/font/(.*\.otf) http_headers: Content-Type: application/x-font-otf - url: /favicon.ico static_files: home/favicon.ico upload: home/favicon.ico - url: /documentation static_dir: documentation - url: /.* script: _go_appinbound_services: - warmup
2 回答

阿波羅的戰(zhàn)車
TA貢獻1862條經驗 獲得超6個贊
還值得注意的是,通用規(guī)則應該放在最后,如下所示:
handlers:
- url: /static/fonts/(.*\.otf)
static_files: static/fonts/\1
upload: static/fonts/(.*\.otf)
mime_type: application/x-font-otf
- url: /static/fonts/(.*\.ttf)
static_files: static/fonts/\1
upload: static/fonts/(.*\.ttf)
mime_type: application/x-font-ttf
- url: /static
static_dir: static
- 2 回答
- 0 關注
- 172 瀏覽
添加回答
舉報
0/150
提交
取消