File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/convex-helpers/server Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,10 @@ export type CorsConfig = {
8484export type RouteSpecWithCors = RouteSpec & CorsConfig ;
8585
8686/**
87- * An HttpRouter with built in cors support.
88- */
87+ * An HttpRouter with built in cors support.
88+ */
8989export type CorsHttpRouter = {
90- http : HttpRouter
90+ http : HttpRouter ;
9191 route : ( routeSpec : RouteSpecWithCors ) => void ;
9292} ;
9393
@@ -96,7 +96,10 @@ export type CorsHttpRouter = {
9696 * @param allowedOrigins An array of allowed origins for CORS.
9797 * @returns A function to use instead of http.route when you want CORS.
9898 */
99- export const corsRouter = ( http : HttpRouter , corsConfig ?: CorsConfig ) : CorsHttpRouter => {
99+ export const corsRouter = (
100+ http : HttpRouter ,
101+ corsConfig ?: CorsConfig ,
102+ ) : CorsHttpRouter => {
100103 const allowedExactMethodsByPath : Map < string , Set < string > > = new Map ( ) ;
101104 const allowedPrefixMethodsByPath : Map < string , Set < string > > = new Map ( ) ;
102105 return {
You can’t perform that action at this time.
0 commit comments