Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 3.7.4 #3648

Merged
merged 25 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
08c5e42
update allow origin header
antsgar Nov 27, 2024
18d4aea
add new line
antsgar Nov 27, 2024
cb8b5bb
Merge pull request #3632 from LiteFarmOrg/main
SayakaOno Dec 17, 2024
ffe48b3
Merge pull request #3551 from LiteFarmOrg/restrict-cors
SayakaOno Dec 17, 2024
5748fb8
LF-4598 Removed redirection and made feddback from self-contained
gursimran-singh Dec 19, 2024
c02e6f6
Merge pull request #3635 from LiteFarmOrg/patch/3.7.2
antsgar Dec 22, 2024
eb7b716
Merge pull request #3637 from LiteFarmOrg/main
antsgar Dec 22, 2024
0d82ffc
revert endpoint change for creating harvest task
antsgar Dec 22, 2024
cb5aebd
update version number
antsgar Dec 22, 2024
8d57e44
Merge pull request #3638 from LiteFarmOrg/patch/3.7.3
antsgar Dec 22, 2024
6bb9394
Merge pull request #3640 from LiteFarmOrg/main
antsgar Dec 22, 2024
3504416
Regenerate pnpm-lock.yaml after 3.7.3 patch and backport
kathyavini Jan 2, 2025
06ac048
Bump failing github workflows to latest pnpm version, and regenerate …
kathyavini Jan 2, 2025
5951cec
Merge pull request #3641 from LiteFarmOrg/regenerate-pnpm-lock-patch-…
antsgar Jan 7, 2025
0e6fb61
Merge branch 'integration' into LF-4598-After-submitting-the-feedback…
gursimran-singh Jan 7, 2025
bf73aa0
Merge pull request #3633 from LiteFarmOrg/LF-4598-After-submitting-th…
antsgar Jan 13, 2025
381ca5e
New Crowdin translations by GitHub Action
crowdin-bot Jan 13, 2025
9a07458
patch/3.7.4 Update version numbers
SayakaOno Jan 13, 2025
5cc6705
Remove pl consent from branch
kathyavini Jan 13, 2025
6cfcad6
Take integration versions of es-fr-pt as these are canonical
kathyavini Jan 13, 2025
e35a9b2
Remove redundant line 'For futher information' from English version
kathyavini Jan 13, 2025
20b94aa
Remove 'For further information' that was inserted in English due to …
kathyavini Jan 13, 2025
4d6392c
Remove extra bullet point in de file
kathyavini Jan 13, 2025
b598a43
Merge pull request #3577 from LiteFarmOrg/l10n_crowdin_translations_i…
SayakaOno Jan 14, 2025
0f11ccc
Merge pull request #3646 from LiteFarmOrg/Update_version
SayakaOno Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint_translation_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6.26.1
version: latest

- name: Install pnpm dependencies
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/webapp_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6.26.1
version: latest
- name: Install dependencies
run: pnpm install
- name: Run unit tests
Expand Down
4 changes: 2 additions & 2 deletions packages/api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "litefarm-api",
"version": "3.7.3",
"version": "3.7.4",
"description": "LiteFarm API server",
"main": "./api/src/server.js",
"type": "module",
Expand Down
18 changes: 16 additions & 2 deletions packages/api/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if (process.env.SENTRY_DSN && environment !== 'development') {
// Automatically instrument Node.js libraries and frameworks
...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(),
],
release: '3.7.3',
release: '3.7.4',
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
Expand Down Expand Up @@ -252,6 +252,19 @@ const rejectBodyInGetAndDelete = (req, res, next) => {
next();
};

const getAllowedOrigin = () => {
switch (environment) {
case 'development':
return 'http://localhost:3000';
case 'integration':
return 'https://beta.litefarm.org';
case 'production':
return 'https://app.litefarm.org';
default:
return 'https://app.litefarm.org';
}
};

app
.use(applyExpressJSON)
.use(express.urlencoded({ extended: true }))
Expand All @@ -260,7 +273,8 @@ app
// prevent CORS errors
.use(cors())
.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
const origin = getAllowedOrigin();
res.header('Access-Control-Allow-Origin', origin);
res.header(
'Access-Control-Allow-Headers',
'Origin, X-Requested-With, Content-Type, Accept, Authorization',
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ http {

proxy_set_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
proxy_pass_request_headers on;
proxy_set_header 'Access-Control-Allow-Origin' '*';
proxy_set_header 'Access-Control-Allow-Origin' 'https://beta.litefarm.org';
proxy_pass http://backend:5000/;
}
listen 443 ssl; # managed by Certbot
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "litefarm-webapp",
"version": "3.7.3",
"version": "3.7.4",
"description": "LiteFarm Web application",
"type": "module",
"scripts": {
Expand Down
Loading
Loading