31 lines
919 B
Ruby
31 lines
919 B
Ruby
Rails.application.routes.draw do
|
|
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
|
|
|
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
|
|
# Can be used by load balancers and uptime monitors to verify that the app is live.
|
|
get "up" => "rails/health#show", as: :rails_health_check
|
|
|
|
# WAF Event Ingestion API
|
|
namespace :api, defaults: { format: :json } do
|
|
post ":project_id/events", to: "events#create"
|
|
end
|
|
|
|
# Root path - projects dashboard
|
|
root "projects#index"
|
|
|
|
# Project management
|
|
resources :projects, only: [:index, :new, :create, :show, :edit, :update] do
|
|
resources :events, only: [:index]
|
|
member do
|
|
get :analytics
|
|
end
|
|
end
|
|
|
|
# Rule management
|
|
resources :rule_sets, only: [:index, :new, :create, :show, :edit, :update] do
|
|
member do
|
|
post :push_to_agents
|
|
end
|
|
end
|
|
end
|