mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 22:36:14 -06:00
Disallow cleartext HTTP for Web Push servers
This commit is contained in:
parent
93aeadbd9f
commit
b0d0f8c0c6
1 changed files with 1 additions and 2 deletions
|
|
@ -225,8 +225,7 @@ func validateNormalizeCreate(request *apimodel.WebPushSubscriptionCreateRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.New("endpoint must be a valid URL")
|
return errors.New("endpoint must be a valid URL")
|
||||||
}
|
}
|
||||||
// TODO: (Vyr) remove http option after testing
|
if endpointURL.Scheme != "https" {
|
||||||
if endpointURL.Scheme != "https" && endpointURL.Scheme != "http" {
|
|
||||||
return errors.New("endpoint must be an https:// URL")
|
return errors.New("endpoint must be an https:// URL")
|
||||||
}
|
}
|
||||||
if endpointURL.Host == "" {
|
if endpointURL.Host == "" {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue