File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
bot/connector-web/src/main/kotlin Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -148,9 +148,11 @@ class WebConnector internal constructor(
148148 // browsers do not send or save cookies unless credentials are allowed
149149 .allowCredentials(webSecurityHandler is WebSecurityCookiesHandler )
150150
151+ // Apply CORS Handler for all paths and all methods (OPTIONS handled automatically)
152+ router.route(" $path *" ).handler(corsHandler)
153+
151154 if (sseEnabled) {
152155 router.route(" $path /sse" )
153- .handler(corsHandler)
154156 .handler(webSecurityHandler)
155157 .handler { context ->
156158 try {
@@ -189,7 +191,6 @@ class WebConnector internal constructor(
189191
190192 // Main connector endpoint
191193 router.post(path)
192- .handler(corsHandler)
193194 .handler(webSecurityHandler)
194195 .handler { context ->
195196 // Override the user on the request body
You can’t perform that action at this time.
0 commit comments