You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Application scenario: When the requested file cannot be found, the top-level index.html file is always returned, which is important for providing web single-page applications.
Let me explain further through a practical scenario:
Now I have a static resources folder with the following structure
I hope that the mapping of the following paths can now be accessed through the createStaticHandler(build_path, defaultDocument: 'index.html') middleware:
shelf/pkgs/shelf_static/lib/src/static_handler.dart
Line 76 in b3adc7c
Is it possible to add an
allowFallback
parameter to enable history mode?example:
fileFound = _tryDefaultFile(allowFallback ? fileSystemPath : fsPath, defaultDocument);
Implement functionality similar to connect-history-api-fallback, which is important for integrating applications like Vue or React.
The text was updated successfully, but these errors were encountered: