Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Current middleware blocks access to media from public folder #1

Open
TheGenio opened this issue May 16, 2024 · 0 comments
Open

Comments

@TheGenio
Copy link

Title

Current middleware blocks access to media from public folder

Description

The current middleware configuration is blocking access to media files in the public folder. We need to update the middleware to allow media files to be served correctly.

Current Middleware

export const config = {
    matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
};

Updated Middleware (Doesn't block media)

export const config = {
    matcher: ["/((?!api|_next/static|_next/image|.*\.png$|.*\.jpg$|favicon.ico)).*"]
};

Steps to Reproduce

  1. Place media files (e.g., .png, .jpg) in the public folder.
  2. Try to access the media files through the browser.
  3. Observe that access is blocked by the current middleware configuration.

Expected Behavior

Media files should be accessible from the public folder without being blocked by the middleware.

Additional Context

This issue needs to be resolved to ensure that all media assets are correctly served from the public folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant