Skip to content

Commit

Permalink
nit indentation
Browse files Browse the repository at this point in the history
Signed-off-by: Maia Iyer <[email protected]>
  • Loading branch information
maia-iyer committed Oct 1, 2024
1 parent 09aeeff commit c5d4826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ type spaHandler struct {
// file located at the index path on the SPA handler will be served. This
// is suitable behavior for serving an SPA (single page application).
func (h spaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
relPath := r.URL.Path
relPath := r.URL.Path
// get the absolute path to prevent directory traversal
absPath, err := filepath.Abs(filepath.Join(h.staticPath, relPath))
if err != nil || !strings.HasPrefix(absPath, h.staticPath) {
Expand Down

0 comments on commit c5d4826

Please sign in to comment.