Class: Maze::Servlets::BaseServlet
- Inherits:
-
WEBrick::HTTPServlet::AbstractServlet
- Object
- WEBrick::HTTPServlet::AbstractServlet
- Maze::Servlets::BaseServlet
- Defined in:
- lib/maze/servlets/base_servlet.rb
Overview
Base servlet to avoid duplication of common code
Direct Known Subclasses
AllCommandsServlet, CommandServlet, LogServlet, ReflectiveServlet, Servlet
Instance Method Summary collapse
-
#do_OPTIONS(request, response) ⇒ Object
Logs and returns a set of valid headers for this servlet.
Instance Method Details
#do_OPTIONS(request, response) ⇒ Object
Logs and returns a set of valid headers for this servlet.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/maze/servlets/base_servlet.rb', line 12 def do_OPTIONS(request, response) response.header['Access-Control-Allow-Origin'] = '*' response.header['Access-Control-Allow-Headers'] = %w[ Accept Bugsnag-Api-Key Bugsnag-Integrity Bugsnag-Payload-Version Bugsnag-Sent-At Bugsnag-Span-Sampling Bugsnag-Uncompressed-Content-Length Content-Type Origin ].join(',') end |