Add OPTIONS routes for new generation endpoints in Neo API
- Registered new OPTIONS routes for /generate, /generate/title, and /generate/prompts in the Neo API, enhancing CORS support for the recently introduced generation functionalities. - This update ensures that the API can handle preflight requests for these endpoints, improving overall API usability and compliance with CORS standards.
This commit is contained in:
parent
375ad96e9d
commit
fc1cbb2457
1 changed files with 3 additions and 0 deletions
|
|
@ -36,6 +36,9 @@ func (neo *DSL) API(router *gin.Engine, path string) error {
|
|||
router.OPTIONS(path+"/upload", neo.optionsHandler)
|
||||
router.OPTIONS(path+"/download", neo.optionsHandler)
|
||||
router.OPTIONS(path+"/mentions", neo.optionsHandler)
|
||||
router.OPTIONS(path+"/generate", neo.optionsHandler)
|
||||
router.OPTIONS(path+"/generate/title", neo.optionsHandler)
|
||||
router.OPTIONS(path+"/generate/prompts", neo.optionsHandler)
|
||||
router.OPTIONS(path+"/dangerous/clear_chats", neo.optionsHandler)
|
||||
|
||||
// Register endpoints with middlewares
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue