Skip to content

Commit 0ba2237

Browse files
authored
chore: reduce logging when processed links are unchanged
1 parent 40444cf commit 0ba2237

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/stac_auth_proxy/middleware/ProcessLinksMiddleware.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,15 @@ def _update_link(
111111
path=f"{self.root_path}{parsed_link.path}"
112112
)
113113

114+
updated_href = urlunparse(parsed_link)
115+
if updated_href == link["href"]:
116+
return
117+
114118
logger.debug(
115119
"Rewriting %r link %r to %r",
116120
link.get("rel"),
117121
link["href"],
118-
urlunparse(parsed_link),
122+
updated_href,
119123
)
120124

121-
link["href"] = urlunparse(parsed_link)
125+
link["href"] = updated_href

0 commit comments

Comments
 (0)