# HttpOrigin

An Origin for an HTTP server or S3 bucket configured for website hosting.

Extends: OriginBase › HttpOrigin
Implements: IOrigin
Superclass of: LoadBalancerV2Origin, S3StaticWebsiteOrigin

- Source: [`aws-cloudfront-origins/lib/http-origin.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-cloudfront-origins/lib/http-origin.ts#L76)

## Example

```ts
declare const regionalEndpointDomainName: string;

const oac = new cloudfront.FunctionUrlOriginAccessControl(this, 'WebFunctionOAC', {
  signing: cloudfront.Signing.SIGV4_ALWAYS_AMZ_AUTH,
});

new cloudfront.Distribution(this, 'MyDistribution', {
  defaultBehavior: {
    origin: new origins.HttpOrigin(regionalEndpointDomainName, {
      originAccessControlId: oac.originAccessControlId,
    }),
  },
});
```

## Initializer

```ts
new HttpOrigin(domainName: string, props?: HttpOriginProps)
```

## Methods

- `bind(scope: Construct, options: OriginBindOptions): OriginBindConfig` — Binds the origin to the associated Distribution.

  Can be used to grant permissions, create dependent resources, etc.
