From e6016340ce63f0f95727c9e9a55a754879d93291 Mon Sep 17 00:00:00 2001 From: Urko Date: Thu, 20 Jul 2023 09:03:22 +0200 Subject: [PATCH] feat: upgrade index information and readme --- README.md | 3 +++ cmd/http/views/index.hbs | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/README.md b/README.md index e1b95d5..9bd9963 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ Bitcoin Payment Checker is a Go application that allows clients to pay for orders using Bitcoin. The application calculates the Bitcoin equivalent of the order amount, provides a wallet address for payment, and tracks the payment status. +## Demo +You can try it here on bitcoin testnet: https://btcpaychecker.urkob.com/ + ## Application Structure The application is structured into several packages: diff --git a/cmd/http/views/index.hbs b/cmd/http/views/index.hbs index cc3f9bb..1056a2a 100644 --- a/cmd/http/views/index.hbs +++ b/cmd/http/views/index.hbs @@ -95,6 +95,7 @@ @@ -195,6 +196,27 @@

Please note that the exact method of displaying the response will depend on the specifics of your application and its user interface.

+ + +

Rate Limiting

+

To protect the service from potential denial-of-service (DoS) attacks, we have implemented rate limiting on our + server. This is done using a middleware in the Fiber framework.

+

The current configuration allows a maximum of 5 requests per client within a 30-minute window. If a client + exceeds this limit, further requests will be temporarily blocked until the rate falls below the limit.

+

This is achieved with the following configuration:

+ +
+    
+        s.app.Use(limiter.New(limiter.Config{
+            Max:               5,
+            Expiration:        30 * time.Minute,
+            LimiterMiddleware: limiter.SlidingWindow{},
+        }))
+    
+
+ +

Please be aware of this limit when integrating with our API to ensure a smooth user experience.

+ \ No newline at end of file