From 06327935670becede39a4577d673fae8de8fe0a4 Mon Sep 17 00:00:00 2001 From: Julien Nahum Date: Wed, 24 Jan 2024 20:48:59 +0100 Subject: [PATCH] Add more custom domain logs --- app/Http/Middleware/CustomDomainRestriction.php | 8 ++++++++ client/components/open/forms/OpenForm.vue | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/CustomDomainRestriction.php b/app/Http/Middleware/CustomDomainRestriction.php index 31f4b0e..ecfb24c 100644 --- a/app/Http/Middleware/CustomDomainRestriction.php +++ b/app/Http/Middleware/CustomDomainRestriction.php @@ -24,6 +24,10 @@ class CustomDomainRestriction $customDomain = $request->header(self::CUSTOM_DOMAIN_HEADER); if (!preg_match(CustomDomainRequest::CUSTOM_DOMAINS_REGEX, $customDomain)) { + \Log::warning('Invalid domain', [ + 'domain' => $customDomain, + 'ip' => $request->ip(), + ]); return response()->json([ 'success' => false, 'message' => 'Invalid domain', @@ -39,6 +43,10 @@ class CustomDomainRestriction // Check if domain is known if (!$workspace = Workspace::whereJsonContains('custom_domains',$customDomain)->first()) { + \Log::warning('Unknown domain', [ + 'domain' => $customDomain, + 'ip' => $request->ip(), + ]); return response()->json([ 'success' => false, 'message' => 'Unknown domain', diff --git a/client/components/open/forms/OpenForm.vue b/client/components/open/forms/OpenForm.vue index 6447303..857dd2d 100644 --- a/client/components/open/forms/OpenForm.vue +++ b/client/components/open/forms/OpenForm.vue @@ -377,13 +377,11 @@ export default { this.dataForm = useForm(formData) }, previousPage () { - console.log('preivousPage', this.currentFieldGroupIndex) this.currentFieldGroupIndex -= 1 window.scrollTo({ top: 0, behavior: 'smooth' }) return false }, nextPage () { - console.log('nextPage',this.currentFieldGroupIndex) this.currentFieldGroupIndex += 1 window.scrollTo({ top: 0, behavior: 'smooth' }) return false