We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c7e025 commit 4279f77Copy full SHA for 4279f77
internal/router/router.go
@@ -16,7 +16,11 @@ const (
16
)
17
18
func httpHandlerFactory(logger *log.Logger) http.HandlerFunc {
19
- return func(w http.ResponseWriter, _ *http.Request) {
+ return func(w http.ResponseWriter, r *http.Request) {
20
+ if r.Method != http.MethodGet {
21
+ w.WriteHeader(http.StatusMethodNotAllowed)
22
+ return
23
+ }
24
mediaBaseUrl, _ := url.Parse(mediaBasePath)
25
imageBaseUrl, _ := url.Parse(imageBasePath)
26
playList, err := mediahandler.GetMedia(mediaBaseUrl, imageBaseUrl)
0 commit comments