shelf
shelf copied to clipboard
Web server middleware for Dart
- Add command line arguments to all shelf example programs. --- - [X] I’ve reviewed the contributor guide and applied the relevant portions to this PR. - One of the...
Hello! I added support for proxying websockets. It is implemented checking the 'Upgrade' header and using `shelf_web_socket` and `web_socket_channel` packages.
Hello, I would like to implement a variable [static Map defaultHeaders] from within the [Response] class to define an instance of default [headers] for all [Response] of the web server...
I create an HTTP server on device A, and send request from device B to device A using HTTP request is successful after some time I send a request again...
add the possibility to specify a regular expression as route my use case is this simple app that I have a Rest API and in the "/storage/" endpoint I want...
https://github.com/dart-lang/shelf/blob/b3adc7c5264b448a77427c6aacd67eedfb16dce2/pkgs/shelf_static/lib/src/static_handler.dart#L76 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](https://github.com/bripkens/connect-history-api-fallback), which is important...
Hi guys! Am I doing something wrong? ### Code in lib\screens\create_server\create_server_screen.dart ```dart final staticHandler = createStaticHandler('assets/web', defaultDocument: 'index.html'); ``` ### pubspec.yaml ```yaml assets: - assets/web/ ``` ### DIrectory exists ...
Hello, When using get methods in combination with websockets the websocket connection fails with the message "[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: WebSocketChannelException: WebSocketChannelException: WebSocketException: Connection to 'http://localhost:8080#' was not upgraded to websocket"....
add a method to group routes and apply specific middleware to this group ```dart app.chain([simulatedMiddleware]).group('/api/v1', (router) { for (final sr in simulatedRoutes) { final method = sr.keys.first.toUpperCase(); final path =...
Hi. I have a folder inside my assets folder which containes my builded react app but createStaticHandler method only get fileSystemPath. How can i create web server from assets folder?...