You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
# Digital Trade Finance Service :briefcase:
2
+
2
3
This repository contains the code for the UK Export Finance Trade Finance Service.
3
4
This documentation provides a comprehensive overview of the UKEF Digital TradeFinance Service (DTFS), including prerequisites, technology stack, setup instructions, testing procedures, deployment guidelines, and other essential information for the developers.
4
5
@@ -89,6 +90,7 @@ npm run stop
89
90
## Different docker compose files
90
91
91
92
There are 3 different docker compose files right now.
93
+
92
94
- docker-compose.yml is used for local development
93
95
- docker-compose.gha.yml is used for the pipelines to run our tests against
94
96
- docker-compose.replica-set.yml is used when you need a replica set enabled on your local database, e.g. when working with the mongodb change stream
@@ -184,7 +186,18 @@ These CSS and JS files are built from SCSS and JS source files using a tool call
184
186
185
187
The developer should run `npm run build` inside the service in question to recompile the CSS and JS in the `public` folder after making any changes to the source files or their dependencies.
186
188
187
-
IMPORTANT: When recompiling JS files, the developer should ensure that they update the `integrity` attribute in any HTML/Nunjucks `script` tags that use the file to reflect the new hash of the recompiled file (a good place to check for these `script` tags is the `templates/index.njk` file in the service). An easy way of finding the new hash is to render a template that uses the script in a browser; a console error should give you the hash of the recompiled file.
Client side JavaScript files are protected by SRI security feature which allows the browser to verify the authenticity of the JavaScript files in use.
192
+
193
+
:warning: If a client side JavaScript file is changed and recompiled during `npm run build`, a new file hash will need to be generated. Otherwise, the script will not be executed.
194
+
195
+
This can be done by updating the `integrity` attribute in any HTML/Nunjucks `script` tags that use the file to reflect the new hash of the recompiled file (a good place to check for these `script` tags is the `templates/index.njk` file in the service).
196
+
197
+
There are two ways to update these:
198
+
199
+
1. (Preferred) Render a template that uses the script in a browser; a console error should give you the hash of the recompiled file.
200
+
2. Run `cat FILENAME.js | openssl dgst -sha512 -binary | openssl base64 -A` on each. Note -- GEF UI references Portal UI's javascript files when using the reverse proxy, so use the hashes from Portal UI's `.js` files in GEF-UI.
0 commit comments