Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
remove unnecessary debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
watzon committed Jan 7, 2024
1 parent 44b750d commit f863cc3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions src/controllers/paste_controller.cr
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ module Paste69

content_type = req.headers["Content-Type"]?
user_agent = req.headers["User-Agent"]?
remote_addr = req.headers["Remote-Addr"]?

pp req
remote_addr = req.headers["Remote-Addr"]? || req.headers["X-Forwarded-For"]?

if !remote_addr
addr = req.request.remote_address
Expand Down
3 changes: 0 additions & 3 deletions src/services/utils_service.cr
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,10 @@ module Paste69

# Maximum lifetime of the file in milliseconds
files_max_lifespan = max_lifespan(size)
pp! files_max_lifespan

# The latest allowed expiration date for this file, in epoch millis
files_max_expiration = files_max_lifespan + current_epoch_millis

pp! files_max_expiration

if requested_expiration.nil?
files_max_expiration
elsif requested_expiration < 1_650_460_320_000
Expand Down

0 comments on commit f863cc3

Please sign in to comment.