You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
> * Stripped down to focus on Microsoft Azure __Authentication__ and __Authorization__ only.
11
11
> * Webpack config added to bundle the handler and dependencies in to a single file.
12
12
> * A __zip__ of the bundled lambda (sans `config.json`) [is released][releases] via a GitHub Action for use in downstream [IaC] projects like [terraform-aws-lambda-edge-azure-auth].
13
-
> * Simple-Url handling for default `index.html` and trailing slash redirects.
13
+
> * Simple URL (a.k.a [pretty URLs]) handling for default `index.html` and trailing slash redirects ([see below](#simple-urls-and-trailing-slash-redirects)).
14
14
> * Downstream terraform module for deployment ([terraform-aws-lambda-edge-azure-auth]).
15
15
16
16
## Description
@@ -59,6 +59,23 @@ be automatically generated).
59
59
60
60
[Manual Deployment](https://github.com/Widen/cloudfront-auth/wiki/Manual-Deployment)__*or*__[AWS SAM Deployment](https://github.com/Widen/cloudfront-auth/wiki/AWS-SAM-Deployment)
61
61
62
+
## Simple URLs and Trailing Slash Redirects
63
+
64
+
This lambda function has some options that enable CloudFront to behave similar to to most static
65
+
site web servers. When CloudFront is backed by a private __S3__ bucket using an OAI ([Origin
66
+
Access Identity]), default `index.html` files are not resolved unless given explicitly in the url
67
+
68
+
For example, a request for `https://example.com/about/` tries to retrieve an object `about/` in
69
+
the bucket, not `about/index.html`)
70
+
71
+
With the `simple_urls_enabled` option enabled (defaults to `true`):
72
+
73
+
*`https://example.com/about/` will return the `https://example.com/about/index.html` object
74
+
75
+
With `trailing_slash_redirects_enabled`:
76
+
77
+
*`https://example.com/about` will trigger a `301` redirect to `https://example.com/about/`
78
+
62
79
## Testing
63
80
64
81
Detailed instructions on testing your function can be found [in the Wiki](https://github.com/Widen/cloudfront-auth/wiki/Debug-&-Test).
@@ -82,6 +99,8 @@ See [CONTRIBUTING.md](Contributing.md).
0 commit comments