@@ -11,7 +11,7 @@ import { App } from "../app"
1111import { AuthType , DefaultedArgs } from "../cli"
1212import { commit , rootPath } from "../constants"
1313import { Heart } from "../heart"
14- import { redirect } from "../http"
14+ import { ensureAuthenticated , redirect } from "../http"
1515import { CoderSettings , SettingsProvider } from "../settings"
1616import { UpdateProvider } from "../update"
1717import { getMediaMime , paths } from "../util"
@@ -113,7 +113,7 @@ export const register = async (
113113 app . router . all ( "/proxy/:port{/*path}" , async ( req , res ) => {
114114 await pathProxy . proxy ( req , res )
115115 } )
116- app . wsRouter . get ( "/proxy/:port{/*path}" , async ( req ) => {
116+ app . wsRouter . get ( "/proxy/:port{/*path}" , ensureAuthenticated , async ( req ) => {
117117 await pathProxy . wsProxy ( req as unknown as WebsocketRequest )
118118 } )
119119 // These two routes pass through the path directly.
@@ -125,7 +125,7 @@ export const register = async (
125125 proxyBasePath : args [ "abs-proxy-base-path" ] ,
126126 } )
127127 } )
128- app . wsRouter . get ( "/absproxy/:port{/*path}" , async ( req ) => {
128+ app . wsRouter . get ( "/absproxy/:port{/*path}" , ensureAuthenticated , async ( req ) => {
129129 await pathProxy . wsProxy ( req as unknown as WebsocketRequest , {
130130 passthroughPath : true ,
131131 proxyBasePath : args [ "abs-proxy-base-path" ] ,
0 commit comments