Phil Astle
07/21/2021, 10:07 AMPhil Astle
07/21/2021, 10:13 AMPhil Astle
07/21/2021, 10:38 AM// Create a Apollo API
const api = new ApolloApi(this, "Api", {
cors : true,
customDomain : customDomain,
defaultFunctionProps : defaultFunctionProps,
server : "graph-server.handler",
});
Here's where I create a standard API (domain URL works):
const api = new sst.Api(this, "Api", {
defaultFunctionProps,
customDomain,
cors: true,
routes: {
"GET /sites/{site_id}/google/request-auth": {
handler: "google/request-oauth.handler",
},
"GET /google/oauth-callback": {
handler: "google/oauth-callback.handler",
permissions: [ auroraClusterPolicy, auroraSecretPolicy ],
},
},
});
Frank
Frank
Phil Astle
07/22/2021, 8:12 AMPhil Astle
07/22/2021, 8:25 AMFrank
Jack Fraser
07/23/2021, 8:49 AMPhil Astle
07/23/2021, 8:53 AMFrank
Frank
Phil Astle
07/23/2021, 11:58 AMFrank
Frank
/
both works.Phil Astle
07/23/2021, 12:44 PMFrank
/
it seemsPhil Astle
07/23/2021, 12:45 PMFrank
Phil Astle
07/23/2021, 12:46 PMFrank
Phil Astle
07/23/2021, 12:48 PMFrank
api.customDomainUrl
doesn’t has the trailing slack, and I wonder if that got u confused.Phil Astle
07/23/2021, 12:49 PMthis.addOutputs({
ApiId: api.httpApi.apiId,
PrivateApiEndpoint: api.httpApi.apiEndpoint,
PublicApiEnpoint: `https://${customDomain.domainName}/${customDomain.path}`,
});
Though getting it off the api object seems better so I'll change it to grab it from there instead and manually add the trailing slashFrank
api.customDomainUrl
.Phil Astle
07/23/2021, 12:51 PMFrank
Frank
api.customDomainUrl
will return with trailing slash if custom domain path
is configured.Phil Astle
07/29/2021, 8:35 AMPhil Astle
07/29/2021, 8:40 AM