mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-11 00:05:36 +02:00
fix: Fix cookie issue
This commit is contained in:
@@ -5,12 +5,21 @@ import { domain } from "./dns";
|
||||
import { secret } from "./secret";
|
||||
import { postgres } from "./postgres";
|
||||
|
||||
const urls = new sst.Linkable("Urls", {
|
||||
properties: {
|
||||
api: `https://api.${domain}`,
|
||||
auth: `https://auth.${domain}`,
|
||||
site: $dev ? "http://localhost:3000" : `https://console.${domain}`,
|
||||
}
|
||||
})
|
||||
|
||||
const apiFn = new sst.aws.Function("ApiFn", {
|
||||
vpc,
|
||||
handler: "packages/functions/src/api/index.handler",
|
||||
streaming: !$dev,
|
||||
link: [
|
||||
bus,
|
||||
urls,
|
||||
auth,
|
||||
postgres,
|
||||
secret.SteamApiKey,
|
||||
|
||||
@@ -236,7 +236,7 @@ export namespace SteamApi {
|
||||
|
||||
setCookie(c, "user_id", user.id);
|
||||
|
||||
const returnUrl = `${new URL(c.req.url).origin}/steam/callback/${userID}`
|
||||
const returnUrl = `${new URL(Resource.Urls.api).origin}/steam/callback/${userID}`
|
||||
|
||||
const params = new URLSearchParams({
|
||||
'openid.ns': 'http://specs.openid.net/auth/2.0',
|
||||
|
||||
6
sst-env.d.ts
vendored
6
sst-env.d.ts
vendored
@@ -105,6 +105,12 @@ declare module "sst" {
|
||||
"name": string
|
||||
"type": "sst.aws.Bucket"
|
||||
}
|
||||
"Urls": {
|
||||
"api": string
|
||||
"auth": string
|
||||
"site": string
|
||||
"type": "sst.sst.Linkable"
|
||||
}
|
||||
"VPC": {
|
||||
"bastion": string
|
||||
"type": "sst.aws.Vpc"
|
||||
|
||||
Reference in New Issue
Block a user