diff --git a/README.md b/README.md index b5d249b..cc7f88d 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Freedom of information is an essential pillar of democracy and informed decision - [ ] Fetch from Google Cache if not available ### Limitations -Certain sites may display missing images or encounter formatting issues. This can be attributed to the site's reliance on JavaScript or CSS for image and resource loading, which presents a limitation when accessed through this proxy. If you prefer a full experience, please concider buying a subscription for the site. +Certain sites may display missing images or encounter formatting issues. This can be attributed to the site's reliance on JavaScript or CSS for image and resource loading, which presents a limitation when accessed through this proxy. If you prefer a full experience, please consider buying a subscription for the site. Some sites do not expose their content to search engines, which means that the proxy cannot access the content. A future version will try to fetch the content from Google Cache. @@ -136,4 +136,4 @@ See in [ruleset.yaml](ruleset.yaml) for an example. - position: .left-content article # Position where to inject the code into DOM prepend: |

Suptitle

-``` \ No newline at end of file +``` diff --git a/handlers/api.go b/handlers/api.go index 28e0346..e8a7611 100644 --- a/handlers/api.go +++ b/handlers/api.go @@ -27,7 +27,8 @@ func Api(c *fiber.Ctx) error { Version: version, Body: body, } - response.Request.Headers = make([]interface{}, 0) + + response.Request.Headers = make([]any, 0, len(req.Header)) for k, v := range req.Header { response.Request.Headers = append(response.Request.Headers, map[string]string{ "key": k, @@ -35,7 +36,7 @@ func Api(c *fiber.Ctx) error { }) } - response.Response.Headers = make([]interface{}, 0) + response.Response.Headers = make([]any, 0, len(resp.Header)) for k, v := range resp.Header { response.Response.Headers = append(response.Response.Headers, map[string]string{ "key": k,