Follow-up from "feat: make _redirects limits configurable"
The following discussions from !778 (merged) should be addressed:
-
@vtak started a discussion: (+4 comments) blocking
Instead of down-sizing
fi.Size()
by applyingint
over it, let us rather useint64
oncfg.MaxConfigSize
if fi.Size() > int64(cfg.MaxConfigSize) {
I wonder if we should be defining the flag as
redirectsMaxConfigSize = flag.Int64(...)
instead ofredirectsMaxConfigSize = flag.Int(...)
....
...
Since
redirectsMaxConfigSize
representsThe maximum size of the _redirects file, in bytes
, keepingredirectsMaxConfigSize = flag.Int(...)
would mean that there is a scenario where the file size can be higher than the maximum value ofint
type (sincefi.Size()
returnsint64
) and the only reason why it wouldn't work properly is because we wouldn't be able to pass a higher value inredirectsMaxConfigSize