@@ -11,9 +11,7 @@ import { createContext } from './orpc/context'
1111import { router } from './orpc/routers'
1212import { sendEmail } from './lib/resend'
1313import { sanitizeLogData } from '@conar/shared/utils/sanitize-log'
14- import { ELECTRIC_EXPOSED_HEADERS } from './lib/electric'
1514import { healthRouter } from './routers/health'
16- import { shapesRouter } from './routers/shapes'
1715
1816const handler = new RPCHandler ( router , {
1917 interceptors : [
@@ -71,7 +69,6 @@ const app = new Hono<{
7169 return origin . endsWith ( '.conar.app' ) || allowedOrigins . includes ( origin ) ? origin : null
7270 } ,
7371 credentials : true ,
74- exposeHeaders : [ ...ELECTRIC_EXPOSED_HEADERS ] ,
7572 } ) )
7673 . get ( '/' , c => c . redirect ( env . MAIN_URL ) )
7774 . use ( '*' , async ( c , next ) => {
@@ -150,7 +147,6 @@ const app = new Hono<{
150147
151148 return auth . handler ( req )
152149 } )
153- . route ( '/shapes' , shapesRouter )
154150 . use ( '/rpc/*' , async ( c , next ) => {
155151 const { matched, response } = await handler . handle ( c . req . raw . clone ( ) , {
156152 prefix : '/rpc' ,
@@ -168,11 +164,4 @@ const app = new Hono<{
168164export default {
169165 fetch : app . fetch ,
170166 port : Number ( process . env . PORT || 3000 ) ,
171- // Electric live shape requests (`live=true`) long-poll: Electric holds the
172- // connection open (~20 s) until new data arrives or the poll window elapses.
173- // Bun's default 30 s idle timeout can close these mid-poll, so portless sees
174- // a reset and serves its 502 page. Raise the ceiling above the poll window
175- // (255 s is Bun's max) so legitimate polls survive while truly stuck sockets
176- // still time out.
177- idleTimeout : 255 ,
178167}
0 commit comments