mardi 29 janvier 2019

Static files are interpreted as Documents while having a different MIME type

I'm setting up a static website With the Google App Engine and my files aren't being served properly.

Example: https://shawnfunke.appspot.com/images/icon_144x.png

Following this URL will give you a Resource interpreted as Document but transferred with MIME type image/png: "https://shawnfunke.appspot.com/images/icon_144x.png". Warning and the PNG couldn't be loaded.

The same happens with other static files such as https://shawnfunke.appspot.com/css/style.css and https://shawnfunke.appspot.com/manifest.json but those still work.

This image REQUEST shows the type is set to Document I don't know why, but the response RESPONSE shows the correct MIME type image/png.

The static content should be served with the expected type / (CSS File/ Image / JSON File).

This is the app.yaml

runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /
  static_files: www/index.html
  upload: www/index.html
  secure: always

- url: /privacy
  static_files: www/pages/privacy.html
  upload: www/pages/privacy.html
  secure: always

- url: /(.*)
  static_files: www/\1
  upload: www/(.*)
  secure: always

The website can be viewed at https://shawnfunke.appspot.com

I've already tried using Chrome Stable and Firefox. The files also show properly on my local PC and can also be viewed at https://github.com/ShawnFunke/website/tree/master/www/images




Aucun commentaire:

Enregistrer un commentaire