Skip to content

Commit 36ffbe0

Browse files
harkingTitozzz
authored andcommitted
chore(docs): Update "source" doc, baseUrl comments about CORS (react-native-webview#881)
After needing to see what the origin of a "html" source'd WebView would be, I found the documentation that baseUrl would be utilized for the "origin" header when CORS requests are made.
1 parent 2256e4e commit 36ffbe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The object passed to `source` can have either of the following shapes:
9090
_Note that using static HTML requires the WebView property [originWhiteList](Reference.md#originWhiteList) to `['*']`. For some content, such as video embeds (e.g. Twitter or Facebook posts with video), the baseUrl needs to be set for the video playback to work_
9191

9292
- `html` (string) - A static HTML page to display in the WebView.
93-
- `baseUrl` (string) - The base URL to be used for any relative links in the HTML.
93+
- `baseUrl` (string) - The base URL to be used for any relative links in the HTML. This is also used for the origin header with CORS requests made from the WebView. See [Android WebView Docs](https://developer.android.com/reference/android/webkit/WebView#loadDataWithBaseURL)
9494

9595
| Type | Required |
9696
| ------ | -------- |

0 commit comments

Comments
 (0)