-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Issue Description:
Problem
ResQueue works correctly when accessing the main dashboard at /resqueue, but the internal JavaScript files fail to load because they are being intercepted and redirected by our application's custom middleware.
Environment
- ASP.NET Core application with multi-tenant architecture
- Custom middleware that redirects requests without tenant context to appropriate start pages
- ResQueue configured with
app.UseResQueue("resqueue")in development environment
What happens
/resqueueloads successfully (main dashboard page)- ResQueue tries to load
/resqueue-4e8efb80-6aae-496f-b8bf-611b63e725bc/config.js - Our custom redirect middleware intercepts this request and redirects it to the home page
- JavaScript files fail to load, breaking the ResQueue UI functionality
Root Cause
Our middleware runs after UseResQueue() and checks if requests have tenant context. Since ResQueue's static files and config endpoints don't have tenant context, they get redirected.
Current Workaround
We've implemented two solutions:
- Added
AllowTenantlessRouteAttributemetadata to ResQueue API endpoints via theconfigureApiparameter - Added path-based bypass in our middleware for
/resqueue-4e8efb80-6aae-496f-b8bf-611b63e725bc/*paths
Suggested Enhancement
It would be helpful if ResQueue could provide a way to:
- Apply custom metadata to all its endpoints and static file routes
This would make it easier for applications with custom middleware to properly handle ResQueue routes without hardcoding the internal GUID.
Code Example
// This should affect static file too but because static file is mapped via app.MapGet, i cant add metadata to it
app.UseResQueue("resqueue", routeGroup =>
{
routeGroup.WithMetadata(new AllowTenantlessRouteAttribute());
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels