-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
How to serve static file without passing from auth #4326
Comments
We are recommending users to configure static assets middleware in the In your case, the static assets are mounted on a subpath (presumably different from your REST API endpoints). In that case it should be fine to move the static middleware to an earlier phase, e.g. {
"initial": {
"loopback#static": {
"name": "images",
"paths": [
"/assets/images"
],
"params": "$!../assets/images"
}
},
"session": {},
"auth": {
"./middleware/checkAuth": {}
},
"parse": {},
"files": {}
} |
I want to serve static files without passing the request from the auth in middleware.
In
middleware.json
I want to bypass auth for serving static files.
The text was updated successfully, but these errors were encountered: