Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions packages/api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@ const env = process.env["ENV"] ?? "";
const app = express();

app.set("query parser", "extended");
app.use(
cors({
origin: `https://${env === "production" ? "www" : env}.permanent.org`,
}),
);
if (env === "dev") {
app.use(
cors({
origin: "https://app.dev.permanent.org",
}),
);
} else {
app.use(
cors({
origin: `https://${env === "production" ? "www" : env}.permanent.org`,
}),
);
}

app.use(expressWinston.logger({ level: "http", winstonInstance: logger }));
app.use(express.json());

Expand Down
4 changes: 2 additions & 2 deletions terraform/test_cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ variable "staging_fusionauth_sftp_application_id" {
variable "legacy_backend_dev_host_url" {
description = "Host URL of the legacy PHP backend"
type = string
default = "https://dev.permanent.org/api"
default = "https://app.dev.permanent.org/api"
}

variable "legacy_backend_staging_host_url" {
Expand Down Expand Up @@ -321,7 +321,7 @@ variable "staging_backblaze_bucket" {
variable "dev_site_url" {
description = "URL of the dev site"
type = string
default = "dev.permanent.org"
default = "app.dev.permanent.org"
}

variable "staging_site_url" {
Expand Down