Method

WebKit2WebViewset_cors_allowlist

since: 2.34

Declaration [src]

void
webkit_web_view_set_cors_allowlist (
  WebKitWebView* web_view,
  const gchar* const* allowlist
)

Description [src]

Sets the allowlist for CORS.

Sets the allowlist for which Cross-Origin Resource Sharing checks are disabled in web_view. URI patterns must be of the form [protocol]://[host]/[path], each component may contain the wildcard character (*) to represent zero or more other characters. All three components are required and must not be omitted from the URI patterns.

Disabling CORS checks permits resources from other origins to load allowlisted resources. It does not permit the allowlisted resources to load resources from other origins.

If this function is called multiple times, only the allowlist set by the most recent call will be effective.

Available since: 2.34

Parameters

allowlist

Type: An array of utf8

An allowlist of URI patterns, or NULL.

The argument can be NULL.
The array must be NULL-terminated.
The data is owned by the caller of the method.
Each element is a NUL terminated UTF-8 string.