Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
atdixon committed Jan 5, 2023
1 parent 6444a68 commit 5b91cc4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion conf/relay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ max-content-length: 1048576
# epoch millis *plus* this delta will be accepted.
max-created-at-delta: 2700

# Optional websockets config.
websockets:
max-outgoing-frames: 5000
disable-permessage-deflate: false
enable-batch-mode: true
enable-batch-mode: false
8 changes: 6 additions & 2 deletions src/me/untethr/nostr/jetty.clj
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,13 @@
;; for non-websocket requests, we expect an earlier handler to handle "/"
;; so this is unexpected...
(log/warn "unexpected request"
{:request-url (.getRequestURL req)
{:request-url (str (.getRequestURL req))
:selected-headers {:connection
(.getHeader req "Connection")}})
(.getHeader req "Connection")
:upgrade
(.getHeader req "Upgrade")
:header-names
(vec (enumeration-seq (.getHeaderNames req)))}})
(update-response! resp {:status 404}))))))

(defn- disable-default-servlet!
Expand Down
2 changes: 1 addition & 1 deletion src/me/untethr/nostr/page/metrics_porcelain.clj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
(let [m (.getMetrics x)
used-bytes (value-of (.get m "total.used"))
max-bytes (value-of (.get m "total.max"))
percentage (* 100 (long (/ used-bytes max-bytes)))]
percentage (long (* 100 (/ used-bytes max-bytes)))]
[:span
[:b (long (/ used-bytes 1000000))] "M / "
[:b (long (/ max-bytes 1000000))] "M (" percentage "%)"]))
Expand Down

0 comments on commit 5b91cc4

Please sign in to comment.