Software / code / prosody
Annotate
.lua-format @ 13854:0b01f40df0f9 13.0
mod_http_file_share: Add media-src 'self' to Content-Security-Policy header
This allows certain media files to be loaded when navigated to directly in a
web browser.
Note that in some browsers (Chrome), the media gets transformed
internally into a HTML page with some basic styles, but these are blocked due
to our default-src policy of 'none' Although this could be unblocked with
style-src unsafe-inline, it is not our plan to fix this, because this would
have negative security implications.
The reason for our CSP is to prevent the file share service from being used to
host malicious HTML/CSS/JS. Yes, CSS can be malicious.
Our file share service is for uploading and downloading files, it is not a
substitute for website/content hosting.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 18 Apr 2025 12:25:06 +0100 |
| parent | 13377:81ae5e12550f |
| rev | line source |
|---|---|
|
13374
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
1 align_args: false |
|
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
2 align_parameter: false |
| 13373 | 3 align_table_field: true |
| 4 break_after_functioncall_lp: false | |
| 5 break_after_functiondef_lp: false | |
|
13374
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
6 break_after_operator: false |
| 13373 | 7 break_after_table_lb: true |
| 8 break_before_functioncall_rp: false | |
| 9 break_before_functiondef_rp: false | |
| 10 break_before_table_rb: true | |
| 11 chop_down_kv_table: true | |
| 12 chop_down_parameter: false | |
|
13374
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
13 chop_down_table: true |
|
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
14 column_limit: 150 |
|
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
15 column_table_limit: 120 |
|
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
16 continuation_indent_width: 1 |
| 13373 | 17 double_quote_to_single_quote: false |
|
13374
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
18 extra_sep_at_table_end: true |
|
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
19 indent_width: 1 |
|
13377
81ae5e12550f
lua-format: Let simple things be one line
Kim Alvefur <zash@zash.se>
parents:
13376
diff
changeset
|
20 keep_simple_control_block_one_line: true |
|
81ae5e12550f
lua-format: Let simple things be one line
Kim Alvefur <zash@zash.se>
parents:
13376
diff
changeset
|
21 keep_simple_function_one_line: true |
| 13375 | 22 line_breaks_after_function_body: 1 |
| 23 line_separator: input | |
| 13373 | 24 single_quote_to_double_quote: false |
| 13375 | 25 spaces_around_equals_in_field: true |
| 13373 | 26 spaces_before_call: 1 |
| 13375 | 27 spaces_inside_functioncall_parens: false |
| 28 spaces_inside_functiondef_parens: false | |
| 29 spaces_inside_table_braces: true | |
|
13374
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
30 tab_width: 1 |
| 13376 | 31 table_sep: ";" |
|
13374
937cd9cabe21
lua-format: Tweaks attempting to fit our code style
Kim Alvefur <zash@zash.se>
parents:
13373
diff
changeset
|
32 use_tab: true |