405 error Method not allowed even if the site works #197

Closed
opened 2026-01-19 18:29:23 +00:00 by michael · 3 comments
Owner

Originally created by @naguam on GitHub.

Hello,
So I set up a instance,
The site works well, It's great, but when I used curl --head, it showed error 405, method not allowed, is it normal ?
I thought it could be because of my nginx reverse proxy (miss configuration) but no : i also tested directly on the localhost:8080 (on the vm I run it) and I confirm the error 405 Method not Allowed (even if the site works).
Thank you.

Originally created by @naguam on GitHub. Hello, So I set up a instance, The site works well, It's great, but when I used `curl --head,` it showed error 405, method not allowed, is it normal ? I thought it could be because of my nginx reverse proxy (miss configuration) but no : i also tested directly on the localhost:8080 (on the vm I run it) and I confirm the error 405 Method not Allowed (even if the site works). Thank you.
Author
Owner

@paolafrancesca commented on GitHub:

@naguam HEAD request is not supported on /

only on these two path patterns: https://github.com/dutchcoders/transfer.sh/blob/master/server/server.go#L389-L390

@paolafrancesca commented on GitHub: @naguam `HEAD` request is not supported on `/` only on these two path patterns: https://github.com/dutchcoders/transfer.sh/blob/master/server/server.go#L389-L390
Author
Owner

@kyodev commented on GitHub:

hi
you can have a clean header with curl --head -XGET url

@kyodev commented on GitHub: hi you can have a clean header with `curl --head -XGET url`
Author
Owner

@naguam commented on GitHub:

Ok thank you for the precision :) (I didn't read all the code, maybe should I 👍 )

@naguam commented on GitHub: Ok thank you for the precision :) (I didn't read all the code, maybe should I :+1: )
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#197