Sha256: 3af60eb3defd80cd3144059548c738bf959ff1c5389c1115acb689bb7e89b79c
Contents?: true
Size: 719 Bytes
Versions: 17
Compression:
Stored size: 719 Bytes
Contents
# frozen_string_literal: true module Bullion module Services # Healthcheck service class Ping < Sinatra::Application configure do set :logging, true set :logger, Bullion::LOGGER end before do content_type "application/json" halt 403 unless request.get? || request.options? if request.get? headers "X-Frame-Options" => "SAMEORIGIN" headers "X-XSS-Protection" => "1; mode=block" end end after do headers "Access-Control-Allow-Methods" => %w[GET] if request.options? end get "/" do '{ "status": "up" }' end options "/" do halt 200 end end end end
Version data entries
17 entries across 17 versions & 1 rubygems