diff --git a/docker/nginx.conf b/docker/nginx.conf
index 4b8720ef2..38eb1d96a 100644
--- a/docker/nginx.conf
+++ b/docker/nginx.conf
@@ -1,40 +1,31 @@
-map $sent_http_content_type $cc_header {
- default "public, max-age=31536000";
- text/html "no-cache";
-}
-
server {
listen 80;
server_name localhost;
- # serve compressed file if filename.gz exists
gzip_static on;
- location = /console/service-worker.js {
- root /usr/share/nginx/html;
- add_header Cache-Control "public, max-age=30" always;
- }
+ # Set root for all locations
+ root /usr/share/nginx/html;
- location = /console/_app/env.js {
- root /usr/share/nginx/html;
- add_header Cache-Control "public, max-age=30" always;
+ # Security headers for all locations
+ add_header X-UA-Compatible "IE=Edge";
+ add_header X-Frame-Options SAMEORIGIN;
+ add_header X-XSS-Protection "1; mode=block;";
+ add_header X-Content-Type-Options nosniff;
+
+ # Only cache files in /console/_app/immutable/ for 1 year
+ location /console/_app/immutable/ {
+ try_files $uri =404;
+
+ expires 1y;
+ add_header Pragma public;
+ add_header Cache-Control "public";
}
+ # All other /console requests (no cache)
location /console {
- root /usr/share/nginx/html;
- index index.html index.htm;
+ index index.html index.html;
try_files $uri /console/index.html;
-
- add_header Cache-Control $cc_header always;
-
- # Deny IE browsers from going into quirks mode
- add_header X-UA-Compatible "IE=Edge";
- # X-Frame-Options is to prevent from clickJacking attack
- add_header X-Frame-Options SAMEORIGIN;
- # This header enables the Cross-site scripting (XSS) filter
- add_header X-XSS-Protection "1; mode=block;";
- # disable content-type sniffing on some browsers.
- add_header X-Content-Type-Options nosniff;
}
location / {
diff --git a/src/hooks.client.ts b/src/hooks.client.ts
index 8802bcaad..5419792a0 100644
--- a/src/hooks.client.ts
+++ b/src/hooks.client.ts
@@ -1,15 +1,15 @@
-// import * as Sentry from '@sentry/sveltekit';
-// import { isCloud, isProd } from '$lib/system';
+import * as Sentry from '@sentry/sveltekit';
+import { isCloud, isProd } from '$lib/system';
import { AppwriteException } from '@appwrite.io/console';
import type { HandleClientError } from '@sveltejs/kit';
-// Sentry.init({
-// enabled: isCloud && isProd,
-// dsn: 'https://c7ce178bdedd486480317b72f282fd39@o1063647.ingest.us.sentry.io/4504158071422976',
-// tracesSampleRate: 1,
-// replaysSessionSampleRate: 0,
-// replaysOnErrorSampleRate: 0
-// });
+Sentry.init({
+ enabled: isCloud && isProd,
+ dsn: 'https://c7ce178bdedd486480317b72f282fd39@o1063647.ingest.us.sentry.io/4504158071422976',
+ tracesSampleRate: 1,
+ replaysSessionSampleRate: 0,
+ replaysOnErrorSampleRate: 0
+});
export const handleError: HandleClientError = ({ error, message, status }) => {
console.error(error);
diff --git a/src/hooks.server.ts b/src/hooks.server.ts
index 3deb88922..e54c183db 100644
--- a/src/hooks.server.ts
+++ b/src/hooks.server.ts
@@ -1,14 +1,14 @@
-// import { sequence } from '@sveltejs/kit/hooks';
-// import { handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
-// import * as Sentry from '@sentry/sveltekit';
-// import { isCloud, isProd } from '$lib/system';
+import { sequence } from '@sveltejs/kit/hooks';
+import { handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
+import * as Sentry from '@sentry/sveltekit';
+import { isCloud, isProd } from '$lib/system';
-// Sentry.init({
-// enabled: isCloud && isProd,
-// dsn: 'https://c7ce178bdedd486480317b72f282fd39@o1063647.ingest.us.sentry.io/4504158071422976',
-// tracesSampleRate: 1.0
-// });
+Sentry.init({
+ enabled: isCloud && isProd,
+ dsn: 'https://c7ce178bdedd486480317b72f282fd39@o1063647.ingest.us.sentry.io/4504158071422976',
+ tracesSampleRate: 1.0
+});
-// export const handle = sequence(sentryHandle());
+export const handle = sequence(sentryHandle());
-// export const handleError = handleErrorWithSentry();
+export const handleError = handleErrorWithSentry();
diff --git a/src/lib/components/filePicker.svelte b/src/lib/components/filePicker.svelte
index b60f49bf5..df2d78f78 100644
--- a/src/lib/components/filePicker.svelte
+++ b/src/lib/components/filePicker.svelte
@@ -167,8 +167,6 @@
}
$: extension = allowedExtension === '*' ? mimeTypeQuery : `.${allowedExtension}`;
-
- $: console.log(`Allowed extensions: ${allowedExtension}, MimeType: ${mimeTypeQuery}`);
diff --git a/src/lib/components/filters/setFilters.ts b/src/lib/components/filters/setFilters.ts
index c59a2408c..b7e0f18c3 100644
--- a/src/lib/components/filters/setFilters.ts
+++ b/src/lib/components/filters/setFilters.ts
@@ -133,7 +133,6 @@ export function setStatusCodeFilter(filter: FilterData, columns: Column[]) {
tag: `**${filter.title}** is **${codeRange.label}**`,
value: statusCodeTag.value
};
- console.log(codeRange);
parsedTags.update((tags) => {
tags.push(newTag);
return tags;
diff --git a/src/lib/components/git/selectRootModal.svelte b/src/lib/components/git/selectRootModal.svelte
index ce4ef53f9..4972d58f7 100644
--- a/src/lib/components/git/selectRootModal.svelte
+++ b/src/lib/components/git/selectRootModal.svelte
@@ -43,7 +43,6 @@
const content = await sdk
.forProject(page.params.region, page.params.project)
.vcs.getRepositoryContents($installation.$id, $repository.id, currentPath);
- // console.log(content);
directories[0].fileCount = content.contents?.length ?? 0;
directories[0].children = content.contents
.filter((e) => e.isDirectory)
@@ -55,10 +54,9 @@
loading: false
}));
currentDir = directories[0];
- // console.log(directories);
isLoading = false;
- } catch (e) {
- console.log(e);
+ } catch {
+ return;
}
});
@@ -85,7 +83,7 @@
const content = await sdk
.forProject(page.params.region, page.params.project)
.vcs.getRepositoryContents($installation.$id, $repository.id, path);
- // console.log(content);
+
const fileCount = content.contents?.length ?? 0;
const contentDirectories = content.contents.filter((e) => e.isDirectory);
diff --git a/src/lib/helpers/files.ts b/src/lib/helpers/files.ts
index f85f4e7bd..bc408d421 100644
--- a/src/lib/helpers/files.ts
+++ b/src/lib/helpers/files.ts
@@ -36,7 +36,6 @@ export async function processFileList(files: FileList): Promise {
buffer: buffer
};
} catch (e) {
- // console.log(file);
return null;
}
});
@@ -46,7 +45,6 @@ export async function processFileList(files: FileList): Promise {
export async function gzipUpload(files: FileList) {
let uploadFile: File;
- const tick = performance.now();
if (!files?.length) return;
// If the file is a tar.gz file, then return it as is
@@ -79,9 +77,6 @@ export async function gzipUpload(files: FileList) {
});
}
}
- console.log(uploadFile);
- const tock = performance.now();
- console.log('Time taken to process files:', tock - tick);
return uploadFile;
}
diff --git a/src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte b/src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte
index 327151445..5c469b627 100644
--- a/src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte
+++ b/src/routes/(console)/organization-[organization]/domains/add-domain/+page.svelte
@@ -20,7 +20,6 @@
async function addDomain() {
try {
domain = await sdk.forConsole.domains.create(page.params.organization, domainName);
- console.log(domain);
invalidate(Dependencies.DOMAINS);
} catch (error) {
addNotification({
diff --git a/src/routes/(console)/organization-[organization]/domains/recordsCard.svelte b/src/routes/(console)/organization-[organization]/domains/recordsCard.svelte
index 17183c1e9..738cb89ef 100644
--- a/src/routes/(console)/organization-[organization]/domains/recordsCard.svelte
+++ b/src/routes/(console)/organization-[organization]/domains/recordsCard.svelte
@@ -31,7 +31,6 @@
try {
domain = await sdk.forConsole.domains.updateNameservers(domain.$id);
verified = domain.nameservers === 'Appwrite';
- console.log(domain);
} catch (error) {
addNotification({
type: 'error',
@@ -39,8 +38,6 @@
});
}
}
-
- $: console.log($consoleVariables._APP_DOMAINS_NAMESERVERS);