Skip to content

Commit b7bd9fe

Browse files
removed api proxy and updated boilerplate
1 parent 929bc6e commit b7bd9fe

File tree

7 files changed

+55
-39
lines changed

7 files changed

+55
-39
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ RUN npm run build
1212

1313
FROM nginx:alpine
1414

15+
RUN ls -la /etc/nginx/conf.d/
16+
1517
COPY --from=build /app/build /usr/share/nginx/html
1618

17-
COPY nginx.conf /etc/nginx/conf.d/default.conf
19+
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
1820

1921
EXPOSE 80
2022

nginx.conf

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ server {
1313
add_header Cache-Control "public";
1414
}
1515

16-
location /api/ {
17-
proxy_pass http://api:8080/;
18-
proxy_http_version 1.1;
19-
proxy_set_header Upgrade $http_upgrade;
20-
proxy_set_header Connection 'upgrade';
21-
proxy_set_header Host $host;
22-
proxy_cache_bypass $http_upgrade;
23-
}
24-
2516
error_page 500 502 503 504 /50x.html;
2617
location = /50x.html {
2718
root /usr/share/nginx/html;

package-lock.json

Lines changed: 26 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@
4141
"last 1 firefox version",
4242
"last 1 safari version"
4343
]
44+
},
45+
"devDependencies": {
46+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
4447
}
4548
}

public/index.html

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,19 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="%PUBLIC_URL%/shield-icon.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
10-
content="Web site created using create-react-app"
10+
content="Generate security PDF reports from GitHub security alerts"
1111
/>
1212
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13-
<!--
14-
manifest.json provides metadata used when your web app is installed on a
15-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16-
-->
1713
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18-
<!--
19-
Notice the use of %PUBLIC_URL% in the tags above.
20-
It will be replaced with the URL of the `public` folder during the build.
21-
Only files inside the `public` folder can be referenced from the HTML.
22-
23-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24-
work correctly both with client-side routing and a non-root public URL.
25-
Learn how to configure a non-root public URL by running `npm run build`.
26-
-->
27-
<title>React App</title>
14+
<title>Security PDF Generator</title>
2815
</head>
2916
<body>
3017
<noscript>You need to enable JavaScript to run this app.</noscript>
3118
<div id="root"></div>
32-
<!--
33-
This HTML file is a template.
34-
If you open it directly in the browser, you will see an empty page.
35-
36-
You can add webfonts, meta tags, or analytics to this file.
37-
The build step will place the bundled scripts into the <body> tag.
38-
39-
To begin the development, run `npm start` or `yarn start`.
40-
To create a production bundle, use `npm run build` or `yarn build`.
41-
-->
4219
</body>
4320
</html>

public/shield-icon.svg

Lines changed: 11 additions & 0 deletions
Loading

src/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import './index.css';
55
import App from './App';
66
import reportWebVitals from './reportWebVitals';
77

8+
document.title = "Security PDF Generator";
9+
10+
// Update favicon dynamically
11+
const link = document.querySelector("link[rel*='icon']") || document.createElement('link');
12+
link.type = 'image/svg+xml';
13+
link.rel = 'icon';
14+
link.href = '/shield-icon.svg';
15+
document.head.appendChild(link);
16+
817
const root = ReactDOM.createRoot(document.getElementById('root'));
918
root.render(
1019
<React.StrictMode>

0 commit comments

Comments
 (0)