Next: API documentation, Previous: Error handling, Up: Top [Contents][Index]
Some aspects of the api can be configured either passing the configuration parameters to the start-api function, or via the configure-api function.
Configure or reconfigure an already existent api
• CORS configuration | ||
• Logging configuration | ||
Next: Logging configuration, Up: API configuration [Contents][Index]
APIs can be configured to append CORS2 headers to responses.
Syntax:
(configure-api api '(:cors &rest options))
• Options; | ||
Up: CORS configuration [Contents][Index]
:enabled
: Boolean. CORS enabled when T
.
:allow-origin
: The “AllowOrigin” header. Default: "*"
:allow-headers
: A list. The “AllowHeaders” header.
:allow-methods
: A list. The “AllowMethods” header. Default: (list :get :put :post :delete)
Previous: CORS configuration, Up: API configuration [Contents][Index]
Log api requests and responses.
Syntax:
(configure-api '(:logging &rest options))
Then evaluate :cl:function::start-api-logging
Previous: CORS configuration, Up: API configuration [Contents][Index]