vitodeploy / vito

The Ultimate Server Management Tool

Home Page:https://vitodeploy.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AVIF wrong mime type

nlemoine opened this issue · comments

Describe the bug

When generating AVIF images, they are sent to the client as the default mime application/octet-stream instead of image/avif.

To Reproduce

  1. Place an AVIF image on your server
  2. Request it from your browser
  3. Image gets downloaded because it's considered application/octet-stream

Expected behavior

Image should open in the browser just like any other supported format.

Additional context

On a more global note, I would strongly advice to rely on https://github.com/h5bp/server-configs-nginx which is a well established, heavy commented, tested and community approved conf files for any nginx server. This would also takes away the pain of maintaining several aspects of nginx configuration (performance, security, keeping mime type up to date, etc.).

Maybe you could provide the basic by default and provide some way to enable/disable proposed configuration sections (for example: https://github.com/h5bp/server-configs-nginx/tree/main/h5bp/web_performance)?

@nlemoine does it require some configuration on the nginx vhost?

does it require some configuration on the nginx vhost?

What topic is the question about? :)

If your question is about my advice on using h5bp/server-configs-nginx, the configuration files targets both global nginx conf and eventually vhost conf.

In the global conf file, you'll probably want sane defaults such as:

In the vhost conf file, the idea I proposed is to have an UI on the site editing screen (a couple of checkboxes that maps the h5bp/server-configs-nginx files) that allows you to enable/disable more specific features like:

You can see an example of this implemented in ansible on the Trellis repo:
https://github.com/roots/trellis/blob/master/roles/wordpress-setup/templates/wordpress-site.conf.j2#L186-L208

I will check this later. For now I can say that we stick to the default configs shipping with Nginx.

For virtual hosts you have the ability to adjust them after the site being created in the site settings.

Sure 👍