Skip to content

Commit

Permalink
Merge pull request #195 from kaltura/ngx-live-store-s3-add-header
Browse files Browse the repository at this point in the history
ngx-live: store_s3_put_add_header directive
  • Loading branch information
david-winder-kaltura authored Feb 28, 2024
2 parents 2a78f61 + 9e20994 commit 76f675a
Show file tree
Hide file tree
Showing 5 changed files with 685 additions and 268 deletions.
8 changes: 8 additions & 0 deletions nginx-live-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,14 @@ Defines the parameters of an S3 bucket used for persistence.
Enables persistence using the specified S3 bucket.
The name parameter must match the name of a previously defined `store_s3_block` block.

#### store_s3_put_add_header
* **syntax**: `store_s3_put_add_header name value;`
* **default**: ``
* **context**: `live`, `preset`

Adds an HTTP header to PUT requests sent to S3.
The header value can contain variables.

#### url
* **syntax**: `url str;`
* **default**: ``
Expand Down
6 changes: 6 additions & 0 deletions nginx-live-module/src/ngx_live_script.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
#include "ngx_live.h"


#define ngx_live_null_complex_value \
{ ngx_null_string, 0, NULL, NULL, { 0 } }
#define ngx_live_static_complex_value(v) \
{ ngx_string(v), 0, NULL, NULL, { 0 } }


typedef struct {
u_char *ip;
u_char *pos;
Expand Down
1 change: 1 addition & 0 deletions nginx-live-module/src/persist/ngx_live_persist.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ ngx_live_persist_write_file(ngx_live_channel_t *channel,

request.pool = pool;
request.channel = channel;
request.vctx = vctx;
request.size = size;
request.handler = handler;
request.data = ctx;
Expand Down
1 change: 1 addition & 0 deletions nginx-live-module/src/persist/ngx_live_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ typedef void (*ngx_live_store_write_handler_pt)(void *data, ngx_int_t rc);
typedef struct {
ngx_pool_t *pool;
ngx_live_channel_t *channel;
ngx_live_variables_ctx_t *vctx;
ngx_str_t path;
ngx_chain_t *cl;
size_t size;
Expand Down
Loading

0 comments on commit 76f675a

Please sign in to comment.