Skip to content
Merged
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
4 changes: 2 additions & 2 deletions moon/apps/sync-server/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Api } from '@gitmono/types'

let baseUrl = 'http://api.gitmega.com'
let baseUrl = 'https://api.gitmega.com'

if (process.env.NODE_ENV === 'production') {
baseUrl = 'http://api.gitmega.com'
baseUrl = 'https://api.gitmega.com'
}

Comment on lines 5 to 8

Copilot AI Jul 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The production and development environments are now using the same URL. This appears redundant - consider removing the conditional assignment or ensuring the production URL is correctly differentiated from development.

Copilot uses AI. Check for mistakes.
export const api = new Api({
Expand Down
10 changes: 5 additions & 5 deletions moon/apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ const cspResourcesByDirective = {
'blob:',
'https://*.gitmono.com',
'wss://*.gitmono.com',
'ws://*.gitmega.com',
'http://*.gitmega.com',
'wss://*.gitmega.com',
'https://*.gitmega.com',
'http://*.gitmono.test:3001',
'http://*.gitmono.test:8000',
process.env.NODE_ENV !== 'production' && 'http://api.gitmega.com',
process.env.NODE_ENV !== 'production' && 'http://git.gitmega.com',
process.env.NODE_ENV !== 'production' && 'https://api.gitmega.com',
process.env.NODE_ENV !== 'production' && 'https://git.gitmega.com',
process.env.NODE_ENV !== 'production' && 'localhost:8000',
process.env.NODE_ENV !== 'production' && 'ws://localhost:9000',
'https://gitmono.s3.ap-southeast-2.amazonaws.com',
Expand Down Expand Up @@ -77,7 +77,7 @@ const cspResourcesByDirective = {
process.env.NODE_ENV !== 'production' && 'https://campsite-dev.imgix.net',
process.env.NODE_ENV !== 'production' && 'https://campsite-dev.imgix.video',
process.env.NODE_ENV !== 'production' && 'https://campsite-api-dev.imgix.net',
'http://*.gitmega.com',
'https://*.gitmega.com',
'https://media.tenor.com' // used for Tenor gifs,
],
'manifest-src': ["'self'"],
Expand Down
10 changes: 5 additions & 5 deletions moon/packages/config/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const WEB_URL_PROD = 'https://app.gitmono.com'
const WEB_URL_DEV = 'http://app.gitmono.test:3000'
const WEB_URL_DEV = 'http://app.gitmono.test'

Copilot AI Jul 28, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The WEB_URL_DEV still uses HTTP protocol while other development URLs have been updated to HTTPS. For consistency and security, consider updating this to use HTTPS as well.

Suggested change
const WEB_URL_DEV = 'http://app.gitmono.test'
const WEB_URL_DEV = 'https://app.gitmono.test'

Copilot uses AI. Check for mistakes.

const SITE_URL_PROD = 'https://www.gitmono.com'
const SITE_URL_DEV = 'http://gitmono.test:3003'

const SYNC_URL_PROD = 'wss://sync.gitmono.com'
const SYNC_URL_DEV = 'ws://sync.gitmega.com'
const SYNC_URL_DEV = 'wss://sync.gitmega.com'

export const IS_PRODUCTION = process.env.APP_ENV === 'production'
export const SCOPE_COOKIE_NAME = 'scope'
Expand All @@ -22,17 +22,17 @@ export const LAST_CLIENT_JS_BUILD_ID_LS_KEY = 'latest-js-time'

export const RAILS_API_URL = IS_PRODUCTION
? 'https://api.gitmono.com'
: process.env.NEXT_PUBLIC_API_URL || 'http://api.gitmega.com'
: process.env.NEXT_PUBLIC_API_URL || 'https://api.gitmega.com'

export const LEGACY_API_URL = IS_PRODUCTION
? 'https://git.gitmono.com'
: process.env.NEXT_PUBLIC_LEGACY_API_URL || 'http://git.gitmega.com'
: process.env.NEXT_PUBLIC_LEGACY_API_URL || 'https://git.gitmega.com'

const RAILS_AUTH_URL_PROD_COM = 'https://auth.gitmono.com'

export const RAILS_AUTH_URL = IS_PRODUCTION
? RAILS_AUTH_URL_PROD_COM
: process.env.NEXT_PUBLIC_AUTH_URL || 'http://auth.gitmega.com'
: process.env.NEXT_PUBLIC_AUTH_URL || 'https://auth.gitmega.com'

/*
Not using an env variable because we use this variable in the browser, which
Expand Down