import { RedirectionSite } from 'cdk-cloudfront-redirector'
new RedirectionSite(scope: Construct, id: string, props: RedirectionSiteProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
RedirectionSiteProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: RedirectionSiteProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { RedirectionSite } from 'cdk-cloudfront-redirector'
RedirectionSite.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
cfDistributionUrl |
string |
No description. |
url |
string |
No description. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly cfDistributionUrl: string;
- Type: string
public readonly url: string;
- Type: string
import { CustomDomainProps } from 'cdk-cloudfront-redirector'
const customDomainProps: CustomDomainProps = { ... }
Name | Type | Description |
---|---|---|
domainName |
string |
Domain name to use for the redirector (used as the record set name). |
hostedZone |
string | aws-cdk-lib.aws_route53.IHostedZone |
Hosted Zone to use for the redirector (used as the record set zone). |
public readonly domainName: string;
- Type: string
Domain name to use for the redirector (used as the record set name).
Example
"i.redir.net"
public readonly hostedZone: string | IHostedZone;
- Type: string | aws-cdk-lib.aws_route53.IHostedZone
Hosted Zone to use for the redirector (used as the record set zone).
Example
"redir.net"@note[object Object]
import { CustomPath } from 'cdk-cloudfront-redirector'
const customPath: CustomPath = { ... }
Name | Type | Description |
---|---|---|
destination |
string |
Destination URL for the custom redirection. |
path |
string |
Path on the Redirector Distribution's URL Back-Half. |
public readonly destination: string;
- Type: string
Destination URL for the custom redirection.
Example
"https://ssennett.net/"
public readonly path: string;
- Type: string
Path on the Redirector Distribution's URL Back-Half.
Example
"/author"
import { RedirectionSiteProps } from 'cdk-cloudfront-redirector'
const redirectionSiteProps: RedirectionSiteProps = { ... }
Name | Type | Description |
---|---|---|
targetUrl |
string |
Destination URL for all redirections. |
customDomain |
CustomDomainProps |
Custom Domain for the redirector to use (Optional). |
pathRedirects |
CustomPath[] |
List of custom back-halves for specific redirections. |
public readonly targetUrl: string;
- Type: string
Destination URL for all redirections.
Example
https://mysite.com/
public readonly customDomain: CustomDomainProps;
- Type: CustomDomainProps
- Default: Not configured
Custom Domain for the redirector to use (Optional).
public readonly pathRedirects: CustomPath[];
- Type: CustomPath[]
- Default: No custom back-half redirections
List of custom back-halves for specific redirections.
Any non-matches will default back to the targetUrl
.
Example
- [{ path: "/author", destination: "https://ssennett.net/" }