hibiken / asynqmon

Web UI for Asynq task queue
MIT License
609 stars 133 forks source link

unexpected path prefix #257

Open 21888 opened 1 year ago

21888 commented 1 year ago

http://localhost:8080/monitoring/ http://localhost:8080/

unexpected path prefix

What does he mean by launching directly as HTTP

fc221 commented 1 year ago

Brother, have you solved it? I have encountered similar problems

binary4cat commented 1 year ago

I'm currently having this problem.

pkierski commented 1 year ago

I guess you've tried to run it on Windows?

I've faced the same issue. It comes from exploiting filepath.Abs() here. On Windows filepath.Abs(r.URL.Path) transforms "/monitoring" to "c:\monitoring" which is correct absolute path in terms of filesystem, but in this place is invalid. The next check (is the path starting with asynqmon root?) fails.

filepath.Abs(r.URL.Path) should be replaced with filepath.ToSlash(filepath.Clean(r.URL.Path)). I'll try to prepare pull request for it.