我已经在授权功能中尝试过此操作,而且还需要验证我无法获得的cookie。 我已尝试使用此https://serverless.com/framework/docs/providers/aws/events/apigateway/#share-api-gateway-and-api-resources 但是无法完成。请事先帮助。
service: shared-gateway
provider:
name: aws
runtime: nodejs8.10
region: ap-southeast-1
endpointType: REGIONAL
resources:
Resources:
SharedGW:
Type: AWS::ApiGateway::RestApi
Properties:
Name: SharedGW
EndpointConfiguration:
Types:
- REGIONAL
ApiGatewayAuthorizer:
Type: AWS::ApiGateway::Authorizer
Properties:
AuthorizerResultTtlInSeconds: 300
IdentitySource: method.request.header.Authorization
Name: SharedGWAuth
RestApiId:
Ref: SharedGW
Type: REQUEST
Outputs:
apiGatewayRestApiId:
Value:
Ref: SharedGW
Export:
Name: SharedGW-restApiId
apiGatewayRestApiRootResourceId:
Value:
Fn::GetAtt:
- SharedGW
- RootResourceId
Export:
Name: SharedGW-rootResourceId