https://github.com/fingerprintjs/docs-redirect
A configuration to redirect from the old documentation domain to the new one
https://github.com/fingerprintjs/docs-redirect
cloudfront cloudfront-functions redirect
Last synced: about 1 year ago
JSON representation
A configuration to redirect from the old documentation domain to the new one
- Host: GitHub
- URL: https://github.com/fingerprintjs/docs-redirect
- Owner: fingerprintjs
- License: mit
- Archived: true
- Created: 2020-10-14T08:18:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-29T11:58:35.000Z (almost 4 years ago)
- Last Synced: 2025-04-11T20:02:23.448Z (about 1 year ago)
- Topics: cloudfront, cloudfront-functions, redirect
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Documentation redirect
The [cloudFront_function.js](cloudFront_function.js) file is a CloudFront function to redirect URLs from [docs.fingerprintjs.com](https://docs.fingerprintjs.com)
to the new address: [dev.fingerprint.com](https://dev.fingerprint.com).
## How to deploy
### Initial setup
Go to [CloudFront functions management](https://console.aws.amazon.com/cloudfront/v3/home?#/functions).
Create a new function, type `Redirects from the old documentation to the new one (https://github.com/fingerprintjs/docs-redirect)` in the "Description" field.
Paste the function code from [cloudFront_function.js](cloudFront_function.js), click "Save changes".
Open the "Publish" tab and publish the function.
Go to [CloudFront management](https://console.aws.amazon.com/cloudfront/v3/home).
Create a new distribution. Leave everything default except:
- Type `dev.null` or anything else in the "Origin domain" field
- Type `docs.fingerprintjs.com` in the "Alternate domain name" field
- Create (if not created) and choose an SSL certificate for the domain in the "Custom SSL certificate" field
- Choose the CloudFront function created earlier in the "Viewer request" field
- Type `Redirects from the old documentation to the new one (https://github.com/fingerprintjs/docs-redirect)` in the "Description" field
### Function code update
1. Go to [CloudFront functions management](https://console.aws.amazon.com/cloudfront/v3/home?#/functions). Open the function.
2. Paste the function code from [cloudFront_function.js](cloudFront_function.js), click "Save changes".
3. Open the "Publish" tab and publish the function.