Tidy up homepage and navigation

This commit is contained in:
Dan Milne
2025-11-09 20:58:13 +11:00
parent c9e2992fe0
commit 1f4428348d
56 changed files with 2822 additions and 955 deletions

View File

@@ -4,17 +4,16 @@ class Api::EventsController < ApplicationController
skip_before_action :verify_authenticity_token
allow_unauthenticated_access # Skip normal session auth, use DSN auth instead
# POST /api/:project_id/events
# POST /api/events
def create
project = authenticate_project!
return head :not_found unless project
dsn = authenticate_dsn!
return head :not_found unless dsn
# Parse the incoming WAF event data
event_data = parse_event_data(request)
# Create event asynchronously
ProcessWafEventJob.perform_later(
project_id: project.id,
event_data: event_data,
headers: extract_serializable_headers(request)
)
@@ -64,8 +63,8 @@ class Api::EventsController < ApplicationController
private
def authenticate_project!
DsnAuthenticationService.authenticate(request, params[:project_id])
def authenticate_dsn!
DsnAuthenticationService.authenticate(request)
end
def parse_event_data(request)