herd-community icon indicating copy to clipboard operation
herd-community copied to clipboard

[Bug]: 301 redirect on missing image

Open iruzevic opened this issue 1 year ago • 0 comments

Platform

macOS

Operating system version

macOs Sonoma 14.2.1 (23C71)

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.6.1 (Build: 25) Pro

PHP Version

PHP 8.3+

Bug description

When you load an asset in the code, such as an image that is missing from the path, Nginx will attempt to open the image and then get redirected to the home page URL, resulting in another request. This could be problematic if you have numerous images, as it may slow down your setup.

This is not how it works in regular setups. If you receive a missing path, it should return a 404 error instead of redirecting the request.

Screenshot 2024-05-22 at 15 19 34 Screenshot 2024-05-22 at 15 19 43 Screenshot 2024-05-22 at 15 19 49

Steps to reproduce

  1. Create and image tag in HTML
  2. Add some missing path to src
  3. Open Inspector and see two requests, one for the image > 301 and one for the home page.an

Relevant log output

No response

iruzevic avatar May 22 '24 13:05 iruzevic