Last active
December 14, 2021 22:45
-
-
Save straight-shoota/301dd22162846d044c89016f7cb2a1f3 to your computer and use it in GitHub Desktop.
Crystal S3 Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"IndexDocument": { | |
"Suffix": "index.html" | |
}, | |
"ErrorDocument": { | |
"Key": "api/1.2.2/404.html" | |
}, | |
"RoutingRules": [ | |
{ | |
"Condition": { | |
"KeyPrefixEquals": "api/latest/1.2.2/" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "302", | |
"Protocol": "https", | |
"ReplaceKeyWith": "404" | |
} | |
}, | |
{ | |
"Condition": { | |
"KeyPrefixEquals": "api/latest/" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "302", | |
"Protocol": "https", | |
"ReplaceKeyPrefixWith": "api/1.2.2/" | |
} | |
}, | |
{ | |
"Condition": { | |
"HttpErrorCodeReturnedEquals": "404", | |
"KeyPrefixEquals": "api/" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "301", | |
"Protocol": "https", | |
"ReplaceKeyPrefixWith": "api/latest/" | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"IndexDocument": { | |
"Suffix": "index.html" | |
}, | |
"ErrorDocument": { | |
"Key": "reference/404.html" | |
}, | |
"RoutingRules": [ | |
{ | |
"Condition": { | |
"KeyPrefixEquals": "reference/installation" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "301", | |
"Protocol": "https", | |
"ReplaceKeyPrefixWith": "install" | |
} | |
}, | |
{ | |
"Condition": { | |
"KeyPrefixEquals": "reference/overview/hello_world.html" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "301", | |
"Protocol": "https", | |
"ReplaceKeyPrefixWith": "reference/getting_started" | |
} | |
}, | |
{ | |
"Condition": { | |
"KeyPrefixEquals": "reference/overview" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "301", | |
"Protocol": "https", | |
"ReplaceKeyPrefixWith": "reference/getting_started" | |
} | |
}, | |
{ | |
"Condition": { | |
"KeyPrefixEquals": "reference/latest/1.2/" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "301", | |
"Protocol": "https", | |
"ReplaceKeyWith": "404" | |
} | |
}, | |
{ | |
"Condition": { | |
"KeyPrefixEquals": "reference/latest" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "302", | |
"Protocol": "https", | |
"ReplaceKeyPrefixWith": "reference/1.2/" | |
} | |
}, | |
{ | |
"Condition": { | |
"HttpErrorCodeReturnedEquals": "404", | |
"KeyPrefixEquals": "reference/" | |
}, | |
"Redirect": { | |
"HostName": "crystal-lang.org", | |
"HttpRedirectCode": "301", | |
"Protocol": "https", | |
"ReplaceKeyPrefixWith": "reference/latest/" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment