dgw / plex-pushover

A simple plex webhook to send a Pushover notification every time someone starts playing media on your server
MIT License
5 stars 3 forks source link

Add 405 Method Not Allowed for GET requests #4

Closed dgw closed 6 years ago

dgw commented 6 years ago

There are plenty of HTTP verbs, but GET is the one most likely to be sent, e.g. by a user poking around with a browser.

Maybe this should send back an error string along with the code, I don't know. I'll think about it before merging.

(PS @grahams, I do this a lot: open PRs on my own repos for stuff I'm working on. Doesn't necessarily mean it's merge-ready, but it helps remind me what I'm working on. I don't do it for other people's repos because it can messy from the maintainers' PoV… 😆 )

dgw commented 6 years ago

I'm happy with the default message that comes with res.sendStatus(405). Somewhere I have a trivial implementation of a custom message, but meh, it seems unnecessary.