mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
add submitters api
This commit is contained in:
1 parent
63e1246a11
commit
7912c9a1ee
16 files changed
+177
-35
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ApiPathConsiderJsonMiddleware
|
||||
def initialize(app)
|
||||
@app = app
|
||||
end
|
||||
|
||||
def call(env)
|
||||
if env['PATH_INFO'].starts_with?('/api') &&
|
||||
!env['PATH_INFO'].ends_with?('/documents') &&
|
||||
!env['PATH_INFO'].ends_with?('/attachments')
|
||||
env['CONTENT_TYPE'] = 'application/json'
|
||||
end
|
||||
|
||||
@app.call(env)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user