Skip to content

Commit 75bf3d8

Browse files
committed
Change env var website to websites
Update README.md and runbook
1 parent a8aa05a commit 75bf3d8

File tree

13 files changed

+38
-150
lines changed

13 files changed

+38
-150
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ if __name__ == '__main__':
4646
- **VIDEO_PORT**: Port number to host the application. Defaults to `8000`
4747
- **FILE_FORMATS**: Sequence of supported video file formats. Defaults to `(.mp4, .mov)`
4848
- **WORKERS**: Number of workers to spin up the `uvicorn` server. Defaults to `1`
49-
- **WEBSITE**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
49+
- **WEBSITES**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
5050
- **AUTO_THUMBNAIL**: Boolean flag to auto generate thumbnail images for preview. Defaults to `True`
51-
- **SECURE_SESSION**: Boolean flag to secure the cookie `session_token` to restrict serving **_ONLY_** via **HTTPS**.
52-
Defaults to `False`
5351
- **KEY_FILE**: Path to the private key file for SSL certificate. Defaults to `None`
5452
- **CERT_FILE**: Path to the full chain file for SSL certificate. Defaults to `None`
55-
> :bulb:   `KEY_FILE` and `CERT_FILE` becomes mandatory when `VIDEO_PORT` is set to `443`
53+
- **SECURE_SESSION**: Boolean flag to secure the cookie `session_token`. Defaults to `False`
54+
> :bulb: &nbsp; If `SECURE_SESSION` to set to `true`, the cookie `session_token` will only be sent via HTTPS<br>
55+
> This means that the server can **ONLY** be hosted via `HTTPS` or `localhost`
5656
5757
## Coding Standards
5858
Docstring format: [`Google`][google-docs] <br>

doc_gen/index.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,6 @@ Basics
7979
:members:
8080
:undoc-members:
8181

82-
Secure
83-
======
84-
85-
.. automodule:: pystream.routers.secure
86-
:members:
87-
:undoc-members:
88-
8982
Video
9083
=====
9184

docs/README.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ <h3>Env Variables<a class="headerlink" href="#env-variables" title="Permalink to
9494
<li><p><strong>VIDEO_PORT</strong>: Port number to host the application. Defaults to <code class="docutils literal notranslate"><span class="pre">8000</span></code></p></li>
9595
<li><p><strong>FILE_FORMATS</strong>: Sequence of supported video file formats. Defaults to <code class="docutils literal notranslate"><span class="pre">(.mp4,</span> <span class="pre">.mov)</span></code></p></li>
9696
<li><p><strong>WORKERS</strong>: Number of workers to spin up the <code class="docutils literal notranslate"><span class="pre">uvicorn</span></code> server. Defaults to <code class="docutils literal notranslate"><span class="pre">1</span></code></p></li>
97-
<li><p><strong>WEBSITE</strong>: List of websites (<em>supports regex</em>) to add to CORS configuration. <em>Required only if tunneled via CDN</em></p></li>
97+
<li><p><strong>WEBSITES</strong>: List of websites (<em>supports regex</em>) to add to CORS configuration. <em>Required only if tunneled via CDN</em></p></li>
9898
<li><p><strong>AUTO_THUMBNAIL</strong>: Boolean flag to auto generate thumbnail images for preview. Defaults to <code class="docutils literal notranslate"><span class="pre">True</span></code></p></li>
9999
<li><p><strong>KEY_FILE</strong>: Path to the private key file for SSL certificate. Defaults to <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
100100
<li><p><strong>CERT_FILE</strong>: Path to the full chain file for SSL certificate. Defaults to <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
101+
<li><p><strong>SECURE_SESSION</strong>: Boolean flag to secure the cookie <code class="docutils literal notranslate"><span class="pre">session_token</span></code>. Defaults to <code class="docutils literal notranslate"><span class="pre">False</span></code></p></li>
101102
</ul>
102103
<blockquote>
103-
<div><p>:bulb:   <code class="docutils literal notranslate"><span class="pre">KEY_FILE</span></code> and <code class="docutils literal notranslate"><span class="pre">CERT_FILE</span></code> becomes mandatory when <code class="docutils literal notranslate"><span class="pre">VIDEO_PORT</span></code> is set to <code class="docutils literal notranslate"><span class="pre">443</span></code></p>
104+
<div><p>:bulb:   If <code class="docutils literal notranslate"><span class="pre">SECURE_SESSION</span></code> to set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, the cookie <code class="docutils literal notranslate"><span class="pre">session_token</span></code> will only be sent via HTTPS<br>
105+
This means that the server can <strong>ONLY</strong> be hosted via <code class="docutils literal notranslate"><span class="pre">HTTPS</span></code> or <code class="docutils literal notranslate"><span class="pre">localhost</span></code></p>
104106
</div></blockquote>
105107
</section>
106108
</section>

docs/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ if __name__ == '__main__':
4646
- **VIDEO_PORT**: Port number to host the application. Defaults to `8000`
4747
- **FILE_FORMATS**: Sequence of supported video file formats. Defaults to `(.mp4, .mov)`
4848
- **WORKERS**: Number of workers to spin up the `uvicorn` server. Defaults to `1`
49-
- **WEBSITE**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
49+
- **WEBSITES**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
5050
- **AUTO_THUMBNAIL**: Boolean flag to auto generate thumbnail images for preview. Defaults to `True`
5151
- **KEY_FILE**: Path to the private key file for SSL certificate. Defaults to `None`
5252
- **CERT_FILE**: Path to the full chain file for SSL certificate. Defaults to `None`
53-
> :bulb: &nbsp; `KEY_FILE` and `CERT_FILE` becomes mandatory when `VIDEO_PORT` is set to `443`
53+
- **SECURE_SESSION**: Boolean flag to secure the cookie `session_token`. Defaults to `False`
54+
> :bulb: &nbsp; If `SECURE_SESSION` to set to `true`, the cookie `session_token` will only be sent via HTTPS<br>
55+
> This means that the server can **ONLY** be hosted via `HTTPS` or `localhost`
5456
5557
## Coding Standards
5658
Docstring format: [`Google`][google-docs] <br>

docs/_sources/README.md.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ if __name__ == '__main__':
4646
- **VIDEO_PORT**: Port number to host the application. Defaults to `8000`
4747
- **FILE_FORMATS**: Sequence of supported video file formats. Defaults to `(.mp4, .mov)`
4848
- **WORKERS**: Number of workers to spin up the `uvicorn` server. Defaults to `1`
49-
- **WEBSITE**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
49+
- **WEBSITES**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
5050
- **AUTO_THUMBNAIL**: Boolean flag to auto generate thumbnail images for preview. Defaults to `True`
5151
- **KEY_FILE**: Path to the private key file for SSL certificate. Defaults to `None`
5252
- **CERT_FILE**: Path to the full chain file for SSL certificate. Defaults to `None`
53-
> :bulb: &nbsp; `KEY_FILE` and `CERT_FILE` becomes mandatory when `VIDEO_PORT` is set to `443`
53+
- **SECURE_SESSION**: Boolean flag to secure the cookie `session_token`. Defaults to `False`
54+
> :bulb: &nbsp; If `SECURE_SESSION` to set to `true`, the cookie `session_token` will only be sent via HTTPS<br>
55+
> This means that the server can **ONLY** be hosted via `HTTPS` or `localhost`
5456

5557
## Coding Standards
5658
Docstring format: [`Google`][google-docs] <br>

docs/_sources/index.rst.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ Images
4242
:members:
4343
:undoc-members:
4444

45-
Secure
46-
======
47-
48-
.. automodule:: pystream.models.secure
49-
:members:
50-
:undoc-members:
51-
5245
Squire
5346
======
5447

@@ -86,13 +79,6 @@ Basics
8679
:members:
8780
:undoc-members:
8881

89-
Secure
90-
======
91-
92-
.. automodule:: pystream.routers.secure
93-
:members:
94-
:undoc-members:
95-
9682
Video
9783
=====
9884

docs/genindex.html

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ <h1 id="index">Index</h1>
4242

4343
<div class="genindex-jumpbox">
4444
<a href="#A"><strong>A</strong></a>
45-
| <a href="#B"><strong>B</strong></a>
4645
| <a href="#C"><strong>C</strong></a>
4746
| <a href="#D"><strong>D</strong></a>
4847
| <a href="#E"><strong>E</strong></a>
@@ -80,23 +79,9 @@ <h2 id="A">A</h2>
8079
</ul></td>
8180
</tr></table>
8281

83-
<h2 id="B">B</h2>
84-
<table style="width: 100%" class="indextable genindextable"><tr>
85-
<td style="width: 33%; vertical-align: top;"><ul>
86-
<li><a href="index.html#pystream.models.secure.base64_decode">base64_decode() (in module pystream.models.secure)</a>
87-
</li>
88-
</ul></td>
89-
<td style="width: 33%; vertical-align: top;"><ul>
90-
<li><a href="index.html#pystream.models.secure.base64_encode">base64_encode() (in module pystream.models.secure)</a>
91-
</li>
92-
</ul></td>
93-
</tr></table>
94-
9582
<h2 id="C">C</h2>
9683
<table style="width: 100%" class="indextable genindextable"><tr>
9784
<td style="width: 33%; vertical-align: top;"><ul>
98-
<li><a href="index.html#pystream.models.secure.calculate_hash">calculate_hash() (in module pystream.models.secure)</a>
99-
</li>
10085
<li><a href="index.html#pystream.models.config.EnvConfig.cert_file">cert_file (pystream.models.config.EnvConfig attribute)</a>
10186
</li>
10287
</ul></td>
@@ -189,19 +174,13 @@ <h2 id="G">G</h2>
189174
<h2 id="H">H</h2>
190175
<table style="width: 100%" class="indextable genindextable"><tr>
191176
<td style="width: 33%; vertical-align: top;"><ul>
192-
<li><a href="index.html#pystream.models.secure.hex_decode">hex_decode() (in module pystream.models.secure)</a>
193-
</li>
194-
<li><a href="index.html#pystream.models.secure.hex_encode">hex_encode() (in module pystream.models.secure)</a>
195-
</li>
196177
<li><a href="index.html#pystream.models.config.EnvConfig.Config.hide_input_in_errors">hide_input_in_errors (pystream.models.config.EnvConfig.Config attribute)</a>
197178
</li>
198179
</ul></td>
199180
<td style="width: 33%; vertical-align: top;"><ul>
200181
<li><a href="index.html#pystream.models.config.Static.home_endpoint">home_endpoint (pystream.models.config.Static attribute)</a>
201182
</li>
202183
<li><a href="index.html#pystream.routers.auth.home_page">home_page() (in module pystream.routers.auth)</a>
203-
</li>
204-
<li><a href="index.html#pystream.routers.secure.https_redirect">https_redirect() (in module pystream.routers.secure)</a>
205184
</li>
206185
</ul></td>
207186
</tr></table>
@@ -274,8 +253,6 @@ <h2 id="M">M</h2>
274253
<li><a href="index.html#module-pystream.models.config">pystream.models.config</a>
275254
</li>
276255
<li><a href="index.html#module-pystream.models.images">pystream.models.images</a>
277-
</li>
278-
<li><a href="index.html#module-pystream.models.secure">pystream.models.secure</a>
279256
</li>
280257
<li><a href="index.html#module-pystream.models.squire">pystream.models.squire</a>
281258
</li>
@@ -286,8 +263,6 @@ <h2 id="M">M</h2>
286263
<li><a href="index.html#module-pystream.routers.auth">pystream.routers.auth</a>
287264
</li>
288265
<li><a href="index.html#module-pystream.routers.basics">pystream.routers.basics</a>
289-
</li>
290-
<li><a href="index.html#module-pystream.routers.secure">pystream.routers.secure</a>
291266
</li>
292267
<li><a href="index.html#module-pystream.routers.video">pystream.routers.video</a>
293268
</li>
@@ -312,7 +287,7 @@ <h2 id="P">P</h2>
312287
</li>
313288
<li><a href="index.html#pystream.models.config.EnvConfig.parse_video_host">parse_video_host() (pystream.models.config.EnvConfig class method)</a>
314289
</li>
315-
<li><a href="index.html#pystream.models.config.EnvConfig.parse_website">parse_website() (pystream.models.config.EnvConfig class method)</a>
290+
<li><a href="index.html#pystream.models.config.EnvConfig.parse_websites">parse_websites() (pystream.models.config.EnvConfig class method)</a>
316291
</li>
317292
<li><a href="index.html#pystream.models.config.Static.preview">preview (pystream.models.config.Static attribute)</a>
318293
</li>
@@ -351,13 +326,6 @@ <h2 id="P">P</h2>
351326

352327
<ul>
353328
<li><a href="index.html#module-pystream.models.images">module</a>
354-
</li>
355-
</ul></li>
356-
<li>
357-
pystream.models.secure
358-
359-
<ul>
360-
<li><a href="index.html#module-pystream.models.secure">module</a>
361329
</li>
362330
</ul></li>
363331
</ul></td>
@@ -395,13 +363,6 @@ <h2 id="P">P</h2>
395363

396364
<ul>
397365
<li><a href="index.html#module-pystream.routers.basics">module</a>
398-
</li>
399-
</ul></li>
400-
<li>
401-
pystream.routers.secure
402-
403-
<ul>
404-
<li><a href="index.html#module-pystream.routers.secure">module</a>
405366
</li>
406367
</ul></li>
407368
<li>
@@ -454,6 +415,8 @@ <h2 id="R">R</h2>
454415
<h2 id="S">S</h2>
455416
<table style="width: 100%" class="indextable genindextable"><tr>
456417
<td style="width: 33%; vertical-align: top;"><ul>
418+
<li><a href="index.html#pystream.models.config.EnvConfig.secure_session">secure_session (pystream.models.config.EnvConfig attribute)</a>
419+
</li>
457420
<li><a href="index.html#pystream.models.stream.send_bytes_range_requests">send_bytes_range_requests() (in module pystream.models.stream)</a>
458421
</li>
459422
<li><a href="index.html#pystream.models.config.Session">Session (class in pystream.models.config)</a>
@@ -463,11 +426,11 @@ <h2 id="S">S</h2>
463426
<li><a href="index.html#pystream.main.shutdown_tasks">shutdown_tasks() (in module pystream.main)</a>
464427
</li>
465428
<li><a href="index.html#pystream.models.subtitles.srt_to_vtt">srt_to_vtt() (in module pystream.models.subtitles)</a>
466-
</li>
467-
<li><a href="index.html#pystream.main.start">start() (in module pystream.main)</a>
468429
</li>
469430
</ul></td>
470431
<td style="width: 33%; vertical-align: top;"><ul>
432+
<li><a href="index.html#pystream.main.start">start() (in module pystream.main)</a>
433+
</li>
471434
<li><a href="index.html#pystream.main.startup_tasks">startup_tasks() (in module pystream.main)</a>
472435
</li>
473436
<li><a href="index.html#pystream.models.config.Static">Static (class in pystream.models.config)</a>
@@ -532,7 +495,7 @@ <h2 id="V">V</h2>
532495
<h2 id="W">W</h2>
533496
<table style="width: 100%" class="indextable genindextable"><tr>
534497
<td style="width: 33%; vertical-align: top;"><ul>
535-
<li><a href="index.html#pystream.models.config.EnvConfig.website">website (pystream.models.config.EnvConfig attribute)</a>
498+
<li><a href="index.html#pystream.models.config.EnvConfig.websites">websites (pystream.models.config.EnvConfig attribute)</a>
536499
</li>
537500
</ul></td>
538501
<td style="width: 33%; vertical-align: top;"><ul>

0 commit comments

Comments
 (0)