jlelse
/
hugo-micropub
Archived
1
Fork 0

Fix mediaendpoint auth

This commit is contained in:
Jan-Lukas Else 2020-01-10 11:14:47 +01:00
parent 9a41fb90b9
commit 2136265825
1 changed files with 2 additions and 2 deletions

View File

@ -28,8 +28,8 @@ func HandleMedia(w http.ResponseWriter, r *http.Request) {
return
}
authCode := r.Header.Get("authorization")
if formAuth := r.FormValue("authorization"); len(authCode) == 0 && len(formAuth) > 0 {
authCode = formAuth
if formAuth := r.FormValue("access_token"); len(authCode) == 0 && len(formAuth) > 0 {
authCode = "Bearer " + formAuth
}
if CheckAuthorization(authCode) {
file, header, err := r.FormFile("file")