Luci Dispatcher redirect needed?

This is my first post here so please be gentle if I asked something stupid :slight_smile:

Currently, LuCI dispatcher redirects browser to the same page again after getting login credentials, but omits query part of the URI used to access the page. It seems that redirect is not needed at all and a simple pass through does the same job, avoiding redirect and keeping the original URI intact.

Here's the relevant piece of code, taken from dispatcher.lua:896

...
			http.header("Set-Cookie", 'sysauth=%s; path=%s; SameSite=Strict; HttpOnly%s' %{
				sid, build_url(), http.getenv("HTTPS") == "on" and "; secure" or ""
			})
			-------------------------------------------------
			-- are this redirect and return needed?
			http.redirect(build_url(unpack(ctx.requestpath)))
			return
			-------------------------------------------------
		end

		if not sid or not sdat or not sacl then
			http.status(403, "Forbidden")
			http.header("X-LuCI-Login-Required", "yes")
			return
		end
...

This is somehow limiting for those pages that allow queries to be used in URI. Is there any caveat if this is used without a redirect?