Skip to content

Commit

Permalink
GITBOOK-460: Added CrossDomains
Browse files Browse the repository at this point in the history
  • Loading branch information
getroot authored and gitbook-bot committed Dec 9, 2024
1 parent d644304 commit 7e6798d
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 45 deletions.
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* [WebRTC Streaming](streaming/webrtc-publishing.md)
* [Low-Latency HLS](streaming/low-latency-hls.md)
* [HLS](streaming/hls.md)
* [CrossDomains](crossdomains.md)
* [Access Control](access-control/README.md)
* [SignedPolicy](access-control/signedpolicy.md)
* [AdmissionWebhooks](access-control/admission-webhooks.md)
Expand Down
36 changes: 36 additions & 0 deletions docs/crossdomains.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# CrossDomains

Most browsers and players prohibit accessing other domain resources in the currently running domain. You can control this situation through Cross-Origin Resource Sharing (CORS) or Cross-Domain (CrossDomain). You can set CORS and Cross-Domain as `<CrossDomains>` element.

CrossDomain settings are available for HTTP-based APIs, HLS, LLHLS, and Thumnail.

```xml
<CrossDomains>
<Url>*</Url>
<Url>*.airensoft.com</Url>
<Url>http://*.ovenplayer.com</Url>
<Url>https://demo.ovenplayer.com</Url>
<Header>
<Key>Access-Control-Expose-Headers</Key>
<Value>Date, Server, Content-Type, Content-Length</Value>
</Header>
<Header>
<Key>custom-header</Key>
<Value>airensoft</Value>
</Header>
</CrossDomains>
```

You can set it using the `<Url>` element as shown above, and you can use the following values:

| Url Value | Description |
| -------------- | ------------------------------------------------------------- |
| \* | Allows requests from all Domains |
| domain | Allows both HTTP and HTTPS requests from the specified Domain |
| http://domain | Allows HTTP requests from the specified Domain |
| https://domain | Allows HTTPS requests from the specified Domain |

You can respond with custom HTTP headers via `<CrossDomains>`. You can use them by adding multiple `<Header><Key>` and `<Header><Value>` as in the example above.



22 changes: 1 addition & 21 deletions docs/streaming/hls.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,27 +203,7 @@ Since TS files used in HLS must have A/V pre-muxed, the Playlist must have the <

## CrossDomain

Most browsers and players prohibit accessing other domain resources in the currently running domain. You can control this situation through Cross-Origin Resource Sharing (CORS) or Cross-Domain (CrossDomain). You can set CORS and Cross-Domain as `<CrossDomains>` element.

{% code title="Server.xml" %}
```markup
<CrossDomains>
<Url>*</Url>
<Url>*.airensoft.com</Url>
<Url>http://*.ovenplayer.com</Url>
<Url>https://demo.ovenplayer.com</Url>
</CrossDomains>
```
{% endcode %}

You can set it using the `<Url>` element as shown above, and you can use the following values:

| Url Value | Description |
| -------------- | ------------------------------------------------------------- |
| \* | Allows requests from all Domains |
| domain | Allows both HTTP and HTTPS requests from the specified Domain |
| http://domain | Allows HTTP requests from the specified Domain |
| https://domain | Allows HTTPS requests from the specified Domain |
For information on CrossDomains, see [CrossDomains ](../crossdomains.md)chapter.

## Live Rewind

Expand Down
22 changes: 1 addition & 21 deletions docs/streaming/low-latency-hls.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,7 @@ See the [Adaptive Bitrates Streaming](../transcoding/#adaptive-bitrates-streamin

## CrossDomain

Most browsers and players prohibit accessing other domain resources in the currently running domain. You can control this situation through Cross-Origin Resource Sharing (CORS) or Cross-Domain (CrossDomain). You can set CORS and Cross-Domain as `<CrossDomains>` element.

{% code title="Server.xml" %}
```markup
<CrossDomains>
<Url>*</Url>
<Url>*.airensoft.com</Url>
<Url>http://*.ovenplayer.com</Url>
<Url>https://demo.ovenplayer.com</Url>
</CrossDomains>
```
{% endcode %}

You can set it using the `<Url>` element as shown above, and you can use the following values:

| Url Value | Description |
| -------------- | ------------------------------------------------------------- |
| \* | Allows requests from all Domains |
| domain | Allows both HTTP and HTTPS requests from the specified Domain |
| http://domain | Allows HTTP requests from the specified Domain |
| https://domain | Allows HTTPS requests from the specified Domain |
For information on CrossDomains, see [CrossDomains ](../crossdomains.md)chapter.

## Streaming

Expand Down
10 changes: 7 additions & 3 deletions docs/thumbnail.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Declaring a thumbnail publisher. Cross-domain settings are available as a detail

When the setting is made for the thumbnail and the stream is input, you can view the thumbnail through the following URL.

| Method | URL Pattern |
| ------ | --------------------------------------------------------------------------------------- |
| GET | http(s)://\<ome\_host_>:\<port>/\<app\_name>/\<output\_stream\_name>/thumb.\<jpg\|png>_ |
| Method | URL Pattern |
| ------ | -------------------------------------------------------------------------------------------- |
| GET | http(s)://\<ome\_hos&#x74;_>:\<port>/\<app\_name>/\<output\_stream\_name>/thumb.\<jpg\|png>_ |

## CrossDomains

For information on CrossDomains, see [CrossDomains ](crossdomains.md)chapter.

0 comments on commit 7e6798d

Please sign in to comment.