Sha256: 02bea2bf12137a9d535e2792e215da95d3524e0ba39f77eaee79de1705c3caf5
Contents?: true
Size: 746 Bytes
Versions: 20
Compression:
Stored size: 746 Bytes
Contents
class Jets::RackController < Jets::Controller::Base layout false internal true skip_forgery_protection # Megamode def process resp = mega_request render(resp) end private # Override process! so it doesnt go through middleware adapter and hits # process logic directly. This handles the case for AWS Lambda. # For local server, we adjust the Middleware::Local logic. def process! status, headers, body = dispatch! # Use the adapter only to convert the Rack triplet to a API Gateway hash structure adapter = Jets::Controller::Rack::Adapter.new(event, context, meth) adapter.convert_to_api_gateway(status, headers, body) end def mega_request Jets::Mega::Request.new(event, self).proxy end end
Version data entries
20 entries across 20 versions & 1 rubygems