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
*[CloudFront docs for Lambda@Edge](http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-at-the-edge.html)
@@ -61,9 +61,11 @@ Node v14, and npm
61
61
62
62
`$ npm install`
63
63
64
-
#### 4. Hardcode your prerender.cloud auth token
64
+
#### 4. Hardcode your headless-render-api.com auth token
65
65
66
-
Edit [handler.js](handler.js) and set your prerender.cloud API token (cmd+f for `prerenderToken`)
66
+
Edit [handler.js](handler.js) and set your headless-render-api.com API token (cmd+f for `prerenderToken`)
67
+
68
+
note: Headless-Render-API.com was previously known as Prerender.cloud (rebranded 2022-05-01)
67
69
68
70
#### 5. Edit any other configs (optional)
69
71
@@ -123,7 +125,7 @@ You can modify the content of the 404 page in [handler.js](handler.js)
123
125
2. invalidate CloudFront
124
126
3. you're done (no need to deploy the Lambda@Edge function after this initial setup)
125
127
126
-
caveat: note that prerender.cloud has a 5-minute server cache that you can disable, see `disableServerCache` in [handler.js](/handler.js)
128
+
caveat: note that headless-render-api.com has a 5-minute server cache that you can disable, see `disableServerCache` in [handler.js](/handler.js)
127
129
128
130
#### 10. You're done!
129
131
@@ -142,9 +144,9 @@ To view logs from command line:
142
144
* (change `AWS_REGION` to whatever region is closest to where you physically are since that's where the logs will be)
143
145
* (FYI, for some reason, San Francisco based requests are ending up in us-west-2)
144
146
145
-
#### Viewing Prerender.cloud logs
147
+
#### Viewing Headless-Render-API.com logs
146
148
147
-
Sign in to prerender.cloud and you'll see the last few requests made for your API key.
149
+
Sign in to headless-render-api.com web app and you'll see the last few requests made for your API key.
148
150
149
151
#### Cleanup
150
152
@@ -157,7 +159,7 @@ You can also sign into AWS and go to CloudFormation and manually remove things.
157
159
## Caveats
158
160
159
161
1. If you can't tolerate a slow first request (where subsequent requests are served from cache in CloudFront):
160
-
* crawl before invalidating the CloudFront distrubtion - just hit all of the URLs with [service.prerender.cloud](https://www.prerender.cloud/docs/api) and configure a `prerender-cache-duration` of something longer than the default of 5 minutes (300) - like 1 week (604800).
162
+
* crawl before invalidating the CloudFront distrubtion - just hit all of the URLs with [service.headless-render-api.com](https://headless-render-api.com/docs/api) and configure a `prerender-cache-duration` of something longer than the default of 5 minutes (300) - like 1 week (604800).
161
163
2. This solution will serve index.html in place of something like `/some-special-file.html` even if `/some-special-file.html` exists on your origin
162
164
* We're waiting for the Lambda@Edge to add a feature to address this
163
165
* in the meantime use the `blacklistPaths` option (see [handler.js](https://github.com/sanfrancesco/prerendercloud-lambda-edge/blob/ccd87b5484a4334d823dbb8f0df16e843b2dc910/handler.js#L81))
@@ -174,5 +176,5 @@ Simply update [serverless.yaml](./serverless.yml) to the [latest or whatever you
174
176
* Check your user-agent if using botsOnly
175
177
* Sometimes (rarely) you'll see an error message on the webpage itself.
176
178
* Check the AWS logs (see section "Viewing AWS Logs in CloudWatch")
177
-
* Check Prerender.cloud logs (see section "Viewing Prerender.cloud logs")
179
+
* Check headless-render-api.com logs (see section "Viewing headless-render-api.com logs")
178
180
* Sometimes (rarely) there's an actual problem with AWS Lambda and you [may just need to re-deploy](https://www.reddit.com/r/aws/comments/7gumv7/question_aws_lambda_nodejs610_environment_issue/)
0 commit comments