Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom HTTP header for CDN integration #239

Closed
yosukehara opened this issue Sep 11, 2014 · 4 comments
Closed

Add custom HTTP header for CDN integration #239

yosukehara opened this issue Sep 11, 2014 · 4 comments

Comments

@yosukehara
Copy link
Member

CDN need to refresh cache-data, we need to implement the headers at leo_gateway.
In addition, we'll consider leo_gateway is able to plug in custom headers.

@mocchira mocchira self-assigned this Sep 24, 2014
@mocchira mocchira added this to the 1.2 milestone Sep 24, 2014
@mocchira
Copy link
Member

We will take this approach.

@yosukehara
Copy link
Member Author

We've adopted Nginx format to the configuration file of LeoFS Gateway for custom headers.
In addition, specify a configuration path in leo_gateway.conf.

## append below line to leo_gateway.conf
http.headers_config_file = ./conf/nginx.conf
location /bucket_a/static_private {
    expires    24h;
    add_header Cache-Control private;
}
location /bucket_b/static_public_frequently_changed {
    expires    5m;
    add_header Cache-Control public;
}

@mocchira
Copy link
Member

mocchira commented Oct 9, 2014

Done IMPL/UT/IT and merged into develop branch.

@mocchira
Copy link
Member

mocchira commented Oct 9, 2014

In expires, we can use a part of this syntax.
For now supporting time intervals are seconds, minutes, hours and days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants