Skip to content

Commit

Permalink
Merge pull request #514 from masslight/security-stuff
Browse files Browse the repository at this point in the history
potential fixes
  • Loading branch information
saewitz authored Oct 24, 2024
2 parents 1e84b12 + 5c6d522 commit 36e8a62
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/telemed-ehr/app/env/.env.local-template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORT=4002
VITE_APP_PORT=4002
VITE_APP_IS_LOCAL=true
VITE_APP_ZAPEHR_APPLICATION_CLIENT_ID=
VITE_APP_ZAPEHR_APPLICATION_DOMAIN=https://auth.zapehr.com
Expand Down
4 changes: 2 additions & 2 deletions packages/telemed-ehr/app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import * as path from 'path';

export default ({ mode }) => {
const envDir = './env';
const env = loadEnv(mode, path.join(process.cwd(), envDir), '');
const env = loadEnv(mode, path.join(process.cwd(), envDir));

return defineConfig({
envDir: envDir,
publicDir: 'public',
plugins: [react(), viteTsconfigPaths(), svgr()],
server: {
open: true,
port: env.PORT ? parseInt(env.PORT) : undefined,
port: env.VITE_APP_PORT ? parseInt(env.VITE_APP_PORT) : undefined,
},
build: {
outDir: './build',
Expand Down
2 changes: 1 addition & 1 deletion packages/telemed-intake/app/env/.env.local-template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORT=3002
VITE_APP_PORT=3002
VITE_APP_IS_LOCAL=true
VITE_APP_CLIENT_ID=
VITE_APP_AUTH0_AUDIENCE='https://api.zapehr.com'
Expand Down
2 changes: 1 addition & 1 deletion packages/telemed-intake/app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import config from '../../../vite.config';
export default (env) => {
const { mode } = env;
const envDir = './env';
const appEnv = loadEnv(mode, path.join(process.cwd(), envDir), '');
const appEnv = loadEnv(mode, path.join(process.cwd(), envDir));

const shouldUploadSentrySourceMaps =
mode === 'testing' || mode === 'staging' || mode === 'dev' || mode === 'production' || mode === 'training';
Expand Down
3 changes: 0 additions & 3 deletions packages/utils/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@ export default defineConfig({
formats: ['es'],
},
},
define: {
'process.env': process.env,
},
});
7 changes: 2 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ dotenv.config();

export default ({ mode }) => {
const envDir = './env';
const env = loadEnv(mode, path.join(process.cwd(), envDir), '');
const env = loadEnv(mode, path.join(process.cwd(), envDir));

return defineConfig({
envDir: envDir,
publicDir: 'public',
plugins: [react(), viteTsconfigPaths(), svgr()],
server: {
open: true,
port: env.PORT ? parseInt(env.PORT) : undefined,
port: env.VITE_APP_PORT ? parseInt(env.VITE_APP_PORT) : undefined,
},
optimizeDeps: {
exclude: ['js-big-decimal', 'jsonpath-plus'],
Expand All @@ -30,8 +30,5 @@ export default ({ mode }) => {
external: ['jsonpath-plus'],
},
},
define: {
'process.env': process.env,
},
});
};

0 comments on commit 36e8a62

Please sign in to comment.