class RedirectionConfig::Index < Lucky::Action include Lucky::ProtectFromForgery include Lucky::EnforceUnderscoredRoute include Lucky::SecureHeaders::DisableFLoC default_format :json get "/redirection_config" do data( data: config_json, content_type: "application/json", disposition: "attachment", filename: "redirector-config.json" ) end private def config_json <<-JSON { "createdBy": "Redirector v3.5.3", "createdAt": "2022-07-17T00:00:00.000Z", "redirects": [ { "description": "Medium -> Scribe", "exampleUrl": "https://medium.com/@user/post-123456abcdef", "exampleResult": "https://#{app_domain}/@user/post-123456abcdef", "error": null, "includePattern": "^https?://(?:.*\\.)*(?