Skip to content

Commit 7183703

Browse files
committed
wip
1 parent 181b97b commit 7183703

48 files changed

Lines changed: 18046 additions & 8 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bin/Tiltfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ docker_build(
3434
'localhost:5001/meet-frontend-dinum:latest',
3535
context='..',
3636
dockerfile='../docker/dinum-frontend/Dockerfile',
37-
only=['./src/frontend', './docker', './.dockerignore'],
37+
only=['./src/frontend', './src/addons', './docker', './.dockerignore'],
3838
target = 'frontend-production',
3939
live_update=[
4040
sync('../src/frontend', '/home/frontend'),
41+
sync('../src/addons', '/home/addons'),
4142
]
4243
)
4344
clean_old_images('localhost:5001/meet-frontend-dinum')

docker/dinum-frontend/Dockerfile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ COPY ./docker/dinum-frontend/assets/ \
3838
COPY ./docker/dinum-frontend/fonts/ \
3939
./dist/assets/fonts/
4040

41+
# ---- Addons builder image ----
42+
FROM node:20-alpine AS addons-builder
43+
44+
WORKDIR /home/addons/outlook
45+
46+
COPY ./src/addons/outlook/package.json ./package.json
47+
COPY ./src/addons/outlook/package-lock.json ./package-lock.json
48+
49+
RUN npm ci
50+
51+
COPY ./src/addons/outlook/ .
52+
53+
RUN npx webpack --mode production
54+
55+
4156
# ---- Front-end image ----
4257
FROM nginxinc/nginx-unprivileged:alpine3.23 AS frontend-production
4358

@@ -60,7 +75,11 @@ COPY --from=meet-builder \
6075
/home/frontend/dist \
6176
/usr/share/nginx/html
6277

63-
COPY ./src/frontend/default.conf /etc/nginx/conf.d
78+
COPY --from=addons-builder \
79+
/home/addons/outlook/dist \
80+
/usr/share/nginx/html/addons/outlook
81+
82+
COPY ./docker/dinum-frontend/nginx/dinum.conf /etc/nginx/conf.d
6483
COPY ./docker/files/usr/local/bin/entrypoint /usr/local/bin/entrypoint
6584

6685
ENTRYPOINT [ "/usr/local/bin/entrypoint" ]

docker/dinum-frontend/nginx/config.js.template

Whitespace-only changes.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
server {
2+
listen 8080;
3+
server_name localhost;
4+
server_tokens off;
5+
6+
root /usr/share/nginx/html;
7+
8+
include /etc/nginx/extra/*.conf;
9+
10+
location = /.well-known/windows-app-web-link {
11+
default_type application/json;
12+
alias /usr/share/nginx/html/.well-known/windows-app-web-link;
13+
add_header Content-Disposition "attachment; filename=windows-app-web-link";
14+
}
15+
16+
# Manifest — fetched, never iframed
17+
location = /addons/outlook/manifest.xml {
18+
alias /usr/share/nginx/html/addons/outlook/manifest.xml;
19+
20+
add_header Access-Control-Allow-Origin "*";
21+
add_header Cache-Control "no-cache, no-store, must-revalidate";
22+
add_header X-Frame-Options "DENY";
23+
add_header Content-Security-Policy "frame-ancestors 'none'";
24+
}
25+
26+
location ~* ^/addons/outlook/assets/.+\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
27+
alias /usr/share/nginx/html/addons/outlook/assets/;
28+
expires 30d;
29+
add_header Cache-Control "public, max-age=2592000, immutable" always;
30+
add_header Access-Control-Allow-Origin "*";
31+
add_header Vary "Origin" always;
32+
}
33+
34+
location ~ ^/addons/outlook(/.*)?$ {
35+
alias /usr/share/nginx/html/addons/outlook$1;
36+
add_header Cache-Control "no-cache, no-store, must-revalidate";
37+
add_header Pragma "no-cache" always;
38+
add_header Expires 0 always;
39+
40+
set $ms_domains "https://*.live.com https://*.office.com https://*.microsoft.com https://*.office365.com https://*.sharepoint.com";
41+
42+
set $nonce $request_id;
43+
44+
set $csp "upgrade-insecure-requests; ";
45+
set $csp "${csp}frame-ancestors ${ms_domains}; ";
46+
set $csp "${csp}script-src 'nonce-${nonce}' 'strict-dynamic'; ";
47+
set $csp "${csp}connect-src 'self' ${ms_domains}; ";
48+
set $csp "${csp}frame-src 'none'; ";
49+
set $csp "${csp}object-src 'none'; ";
50+
set $csp "${csp}base-uri 'none'; ";
51+
52+
add_header Content-Security-Policy $csp;
53+
54+
sub_filter 'NONCE_PLACEHOLDER' $nonce;
55+
sub_filter_once off;
56+
sub_filter_types text/html;
57+
}
58+
59+
# Serve static files with caching
60+
location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
61+
expires 30d;
62+
add_header Cache-Control "public, max-age=2592000";
63+
}
64+
65+
# Serve static files
66+
location / {
67+
try_files $uri $uri/ /index.html;
68+
# Add no-cache headers
69+
add_header Cache-Control "no-cache, no-store, must-revalidate";
70+
add_header Pragma "no-cache"; # HTTP 1.0 header for backward compatibility
71+
add_header Expires 0;
72+
}
73+
74+
# Optionally, handle 404 errors by redirecting to index.html
75+
error_page 404 =200 /index.html;
76+
}

src/addons/outlook/.eslintrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"plugins": [
3+
"office-addins"
4+
],
5+
"extends": [
6+
"plugin:office-addins/recommended"
7+
]
8+
}
396 Bytes
Loading
678 Bytes
Loading
1.44 KB
Loading
1.67 KB
Loading
307 Bytes
Loading

0 commit comments

Comments
 (0)