Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

WebView.SetVirtualHostNameToFolderMapping

Add a virtual host mapping.

Component Version macOS Windows Linux Server iOS SDK
WebView 14.3 ❌ No ✅ Yes ❌ No ❌ No ❌ No
MBS( "WebView.SetVirtualHostNameToFolderMapping"; WebViewerRef; hostName; folderPath; accessKind )   More

Parameters

Parameter Description Example
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.
hostName A virtual host name. "MyFiles"
folderPath A folder path name to be mapped to the virtual host name. "C:\Users\Test\Desktop\Test"
accessKind The level of access to resources under the virtual host from other sites. "Allow"

Result

Returns OK or error.

Description

Add a virtual host mapping.
Sets a mapping between a virtual host name and a folder path to make available to web sites via that host name.

FlagDescription
AllowAll cross origin resource access is allowed, including accesses that are subject to Cross-Origin Resource Sharing(CORS) check. The behavior is similar to a web site sends back http header Access-Control-Allow-Origin: *.
DenyAll cross origin resource access is denied, including normal sub resource access as src of a script or image element.
DenyCorsCross origin resource access is allowed for normal sub resource access like as src of a script or image element, while any access that subjects to CORS check will be denied. See Cross-Origin Resource Sharing for more information.

Requires FileMaker 19.4 and WebView2 browser component.

See also

Release notes

Blog Entries

This function checks for a license.

Created 17th June 2024, last changed 17th June 2024


WebView.SetUsePrivateBrowsing - WebView.ShowDebugBar