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

Exchange rate API not allowed by NGINX config #1487

Closed
1 task done
mayrmartin opened this issue Oct 17, 2023 · 2 comments · Fixed by #1505
Closed
1 task done

Exchange rate API not allowed by NGINX config #1487

mayrmartin opened this issue Oct 17, 2023 · 2 comments · Fixed by #1505
Assignees
Labels
bug Something isn't working

Comments

@mayrmartin
Copy link
Collaborator

mayrmartin commented Oct 17, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

Description 😯

In PR #1406 (closed) the endpoint to fetch the exchange rates was made dynamically. This leads to an error when the access point is not set to the default value as it is not marked in the NGINX config as an allowed host.
Furthermore, there is an issue regarding older releases.
There was a change regarding the endpoint where we fetch the currency per default. This change was made by changing the URL but not reflecting the changes in the NGINX config. This issue was reported on a Trubduget Sandbox which runs on 1.30.

Proposed ToDos:

  • if the exchange URL should be dynamic, allow the domain in the NGINX config by making it also dynamic
  • Evaluate how this issue impacts older versions and how big the impact is
@mayrmartin mayrmartin added the bug Something isn't working label Oct 17, 2023
@mayrmartin mayrmartin added this to the TruBudget 2.4.0 milestone Oct 17, 2023
@SamuelPull
Copy link
Collaborator

FYI nginx conf update has been done in https://github.com/openkfw/TruBudget/pull/1411/files

@SamuelPull
Copy link
Collaborator

SamuelPull commented Oct 30, 2023

Issue is twofold: nginx config doesn't combine multiple "add scp header" directives, but chooses the most restrictive one. Rule for additional forex api wasn't applied.
Frontend container was always using the predefined forex url, because config is fixed at build time.
What's missing is a default in env.js and its substition with configureServer.sh script.
Version 1.30 has hardcoded url that ECB retired this year, nothing that can be done about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants