Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(ci): don't exclude contentEncodingLambda in ci

synoet5917af593d93
diff --git a/infra/.gitignore b/infra/.gitignore
index 6f48f44307..a4937d1712 100644
--- a/infra/.gitignore
+++ b/infra/.gitignore
@@ -3,6 +3,8 @@
!.eslintrc.js
!.prettierrc.js
!library.js
+!**/appRouteLambda/**/*.js
+!**/contentEncodingLambda/**/*.js
node_modules
dist
diff --git a/infra/stacks/web-app/contentEncodingLambda/index.js b/infra/stacks/web-app/contentEncodingLambda/index.js
new file mode 100644
index 0000000000..c605938054
--- /dev/null
+++ b/infra/stacks/web-app/contentEncodingLambda/index.js
@@ -0,0 +1,16 @@
+exports.handler = (event, _context, callback) => {
+ const response = event.Records[0].cf.response;
+ const headers = response.headers;
+ const request = event.Records[0].cf.request;
+
+ if (
+ request.uri.includes('soffice') &&
+ (request.uri.endsWith('.wasm') ||
+ request.uri.endsWith('.data') ||
+ request.uri.endsWith('.patch'))
+ ) {
+ headers['content-encoding'] = [{ key: 'Content-Encoding', value: 'br' }];
+ }
+
+ callback(null, response);
+};