Skip to content

[INF] Closing connection: no matched rule, Change behaviour to a custom default response #112

New issue

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

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

Already on GitHub? # to your account

Open
brenocss opened this issue Mar 23, 2023 · 0 comments
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@brenocss
Copy link
Contributor

Please describe your feature request:

Now: [INF] Closing connection: no matched rule
Expected: simple http response like interact sh

Describe the use case of this feature:

Currently, the simplehttp server in TCP mode accepts rules. However, when no rule is matched, it would be nice to have a way to customize the rules for a no-match scenario. For example:

rules:
  # HTTP Requests
  - default-http:
    name: default-http
    response: |
              HTTP/1.1 200 OK
              Content-Type: text/html; charset=utf-8
              Server: simplehttpserver
              simplehttpserver: 1.1.2
              Content-Length: 72
              Connection: close

              <html><head></head><body>{{randomString}}</body></html>
@brenocss brenocss added the Type: Enhancement Most issues will probably ask for additions or changes. label Mar 23, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

No branches or pull requests

1 participant