@rivascva/dt-idl 1.1.66 → 1.1.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,15 +12,7 @@ import (
12
12
  "github.com/RivasCVA/dt-idl/go/utils/responder"
13
13
  )
14
14
 
15
- // Adds shared headers to all responses.
16
- func CommonHeaders(next http.Handler) http.Handler {
17
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
18
- w.Header().Add("content-type", "application/json")
19
- next.ServeHTTP(w, r)
20
- })
21
- }
22
-
23
- // Returns a middleware function that perform authentication checks for a request.
15
+ // Returns a middleware function that authenticates all requests except for the login endpoints.
24
16
  // It attaches the token to the request context.
25
17
  func GetAuthMiddleware(secret string) func(http.Handler) http.Handler {
26
18
  responder := responder.NewStandardResponder(logger.NewConsoleLoggerWithPrefix("GetAuthMiddleware:"), "ERROR")
@@ -55,3 +47,11 @@ func GetAuthMiddleware(secret string) func(http.Handler) http.Handler {
55
47
  })
56
48
  }
57
49
  }
50
+
51
+ // Adds shared headers to all responses.
52
+ func CommonHeaders(next http.Handler) http.Handler {
53
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
54
+ w.Header().Add("content-type", "application/json")
55
+ next.ServeHTTP(w, r)
56
+ })
57
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.66",
3
+ "version": "1.1.67",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",