github.com/blend/go-sdk@v1.20220411.3/webutil/scheme_is_secure.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package webutil 9 10 // SchemeIsSecure returns if a given scheme is secure. 11 // 12 // This is typically used for the `Secure` flag on cookies. 13 func SchemeIsSecure(scheme string) bool { 14 switch scheme { 15 case SchemeHTTPS, SchemeSPDY: 16 return true 17 } 18 return false 19 }