Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrossOrigin ¶
type CrossOrigin int
const ( DefaultCrossOrigin CrossOrigin = iota Anonymous // UseCredentials The browser will send cookies along with the request. UseCredentials )
func (CrossOrigin) String ¶
func (i CrossOrigin) String() string
type ReferrerPolicy ¶
type ReferrerPolicy int
const ( // None dont set any priority None ReferrerPolicy = iota // NoReferrer The Referer header will not be sent. NoReferrer // NoneWhenDowngrade The Referer header will not be sent to origins without TLS (HTTPS). NoReferrerWhenDowngrade // Origin The sent referrer will be limited to the origin of the referring page: its scheme, host, and port. Origin // OriginWhenCrossOrigin The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path. OriginWhenCrossOrigin // SameOrigin A referrer will be sent for same origin, but cross-origin requests will contain no referrer information. SameOrigin // StrictOrigin Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP). StrictOrigin // StrictOriginWhenCrossOrigin Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP). StrictOriginWhenCrossOrigin // UnsafeURL The referrer will include the origin and the path (but not the fragment, password, or username). This value is unsafe, because it leaks origins and paths from TLS UnsafeURL )
func (ReferrerPolicy) String ¶
func (i ReferrerPolicy) String() string
type Script ¶
type Script struct {
// Content is the content of the script
Content string
// Src is the source of the script
// If both Content and Src are set, two scripts will be rendered
Src string
// Type will default to module. If you want to use old script, set it to text/javascript
Type string
Blocking string
Async bool
CrossOrigin CrossOrigin
Defer bool
Priority Priority
Integrity string
Nonce string
Referrerpolicy ReferrerPolicy
NoModule bool
Data map[string]string
}
Click to show internal directories.
Click to hide internal directories.