@@ -91,10 +91,10 @@ func StartServer(runbookPath string, port int, outputPath string) error {
9191 r .SetTrustedProxies (nil )
9292
9393 // API endpoint to serve the runbook file contents
94- r .GET ("/api/runbook" , HandleRunbookRequest (runbookPath , false , true ))
94+ r .GET ("/api/runbook" , HandleRunbookRequest (resolvedPath , false , true ))
9595
9696 // Set up common routes
97- setupCommonRoutes (r , runbookPath , outputPath , registry , true )
97+ setupCommonRoutes (r , resolvedPath , outputPath , registry , true )
9898
9999 // listen and serve on localhost:$port only (security: prevent remote access)
100100 return r .Run ("127.0.0.1:" + fmt .Sprintf ("%d" , port ))
@@ -131,10 +131,10 @@ func StartBackendServer(runbookPath string, port int, outputPath string) error {
131131 }))
132132
133133 // API endpoint to serve the runbook file contents
134- r .GET ("/api/runbook" , HandleRunbookRequest (runbookPath , false , true ))
134+ r .GET ("/api/runbook" , HandleRunbookRequest (resolvedPath , false , true ))
135135
136136 // Set up common routes (includes all other endpoints)
137- setupCommonRoutes (r , runbookPath , outputPath , registry , true )
137+ setupCommonRoutes (r , resolvedPath , outputPath , registry , true )
138138
139139 // listen and serve on localhost:$port only (security: prevent remote access)
140140 return r .Run ("127.0.0.1:" + fmt .Sprintf ("%d" , port ))
@@ -173,13 +173,13 @@ func StartServerWithWatch(runbookPath string, port int, outputPath string, useEx
173173 r .SetTrustedProxies (nil )
174174
175175 // API endpoint to serve the runbook file contents
176- r .GET ("/api/runbook" , HandleRunbookRequest (runbookPath , true , useExecutableRegistry ))
176+ r .GET ("/api/runbook" , HandleRunbookRequest (resolvedPath , true , useExecutableRegistry ))
177177
178178 // SSE endpoint for file change notifications
179179 r .GET ("/api/watch" , HandleWatchSSE (fileWatcher ))
180180
181181 // Set up common routes
182- setupCommonRoutes (r , runbookPath , outputPath , registry , useExecutableRegistry )
182+ setupCommonRoutes (r , resolvedPath , outputPath , registry , useExecutableRegistry )
183183
184184 // listen and serve on localhost:$port only (security: prevent remote access)
185185 return r .Run ("127.0.0.1:" + fmt .Sprintf ("%d" , port ))
0 commit comments