404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.149.253.148: ~ $
**To enable CORS for an HTTP API**

The following ``update-api`` example updates the specified API's CORS configuration to allow requests from ``https://www.example.com``. ::

    aws apigatewayv2 update-api \
        --api-id a1b2c3d4 \
        --cors-configuration AllowOrigins=https://www.example.com

Output::

    {    
        "ApiEndpoint": "https://a1b2c3d4.execute-api.us-west-2.amazonaws.com",    
        "ApiId": "a1b2c3d4",
        "ApiKeySelectionExpression": "$request.header.x-api-key",
        "CorsConfiguration": {
            "AllowCredentials": false,
            "AllowHeaders": [
                "header1",
                "header2"
            ],
            "AllowMethods": [
                "GET",
                "OPTIONS"
            ],
            "AllowOrigins": [
                "https://www.example.com"
            ]
        },
        "CreatedDate": "2020-04-08T18:39:37+00:00",
        "Name": "my-http-api",
        "ProtocolType": "HTTP",
        "RouteSelectionExpression": "$request.method $request.path",
        "Tags": {},
        "Version": "v1.0"
    }

For more information, see `Configuring CORS for an HTTP API <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html>`__ in the *Amazon API Gateway Developer Guide*.

Filemanager

Name Type Size Permission Actions
create-api-mapping.rst File 781 B 0644
create-api.rst File 1.96 KB 0644
create-authorizer.rst File 1.11 KB 0644
create-deployment.rst File 693 B 0644
create-domain-name.rst File 1.2 KB 0644
create-integration.rst File 1.88 KB 0644
create-route.rst File 1.24 KB 0644
create-stage.rst File 728 B 0644
create-vpc-link.rst File 962 B 0644
delete-access-log-settings.rst File 593 B 0644
delete-api-mapping.rst File 554 B 0644
delete-api.rst File 488 B 0644
delete-authorizer.rst File 466 B 0644
delete-cors-configuration.rst File 486 B 0644
delete-deployment.rst File 475 B 0644
delete-domain-name.rst File 484 B 0644
delete-integration.rst File 619 B 0644
delete-route-settings.rst File 514 B 0644
delete-route.rst File 425 B 0644
delete-stage.rst File 433 B 0644
delete-vpc-link.rst File 421 B 0644
export-api.rst File 693 B 0644
get-api-mapping.rst File 728 B 0644
get-api-mappings.rst File 962 B 0644
get-api.rst File 628 B 0644
get-apis.rst File 1.43 KB 0644
get-authorizer.rst File 884 B 0644
get-authorizers.rst File 1.51 KB 0644
get-deployment.rst File 738 B 0644
get-deployments.rst File 1.1 KB 0644
get-domain-name.rst File 1.09 KB 0644
get-domain-names.rst File 1.89 KB 0644
get-integration.rst File 988 B 0644
get-integrations.rst File 1.42 KB 0644
get-route.rst File 623 B 0644
get-routes.rst File 987 B 0644
get-stage.rst File 850 B 0644
get-stages.rst File 2.05 KB 0644
get-tags.rst File 547 B 0644
get-vpc-link.rst File 883 B 0644
get-vpc-links.rst File 1.62 KB 0644
import-api.rst File 1.43 KB 0644
reimport-api.rst File 1.48 KB 0644
tag-resource.rst File 548 B 0644
untag-resource.rst File 547 B 0644
update-api-mapping.rst File 866 B 0644
update-api.rst File 1.29 KB 0644
update-authorizer.rst File 969 B 0644
update-deployment.rst File 780 B 0644
update-domain-name.rst File 1.22 KB 0644
update-integration.rst File 1.2 KB 0644
update-route.rst File 1.4 KB 0644
update-stage.rst File 1.04 KB 0644
update-vpc-link.rst File 986 B 0644