feat: set host with header

This commit is contained in:
2026-04-12 00:18:44 +02:00
parent 5c13f88d70
commit d749e5ee63
3 changed files with 24 additions and 7 deletions
+2
View File
@@ -61,6 +61,8 @@ class StaplerRequestHandler(http.server.SimpleHTTPRequestHandler):
except Exception as e:
return self.send_error(http.HTTPStatus.INTERNAL_SERVER_ERROR, str(e))
self.send_status_only(http.HTTPStatus.CREATED, f"Resource /{sub_path}/ updated")
if self.headers["X-Host"]:
self.registry.set_host(sub_path, self.headers["X-Host"])
self.registry.add(sub_path)
def do_DELETE(self):