research-software-directory / RSD-as-a-service

This repo contains the new RSD-as-a-service implementation
https://research.software
27 stars 14 forks source link

chore: add plugin hostname to plugin configuration #1310

Closed cmeessen closed 1 month ago

cmeessen commented 1 month ago

Fixes connection issues when running nextjs in a docker container.

Changes proposed in this pull request:

How to test:

@dmijatovic please review this solution. I will update the documentation after you will have accepted.

PR Checklist:

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed for 'rsd-frontend'

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

dmijatovic commented 1 month ago

@cmeessen I tested your proposal with the plugin example I was working on and came to conclusion that I favor direct link to the config endpoint of the plugin. This approach supports various scenarios like: api versioning and running frontend in dev mode. It does require config_url to be changed in various scenarios but it does not impact core RSD code. I have pushed additional commit with the preferred approach.

In addition, I removed useMemo advised by SonarCloud because it does not adds the value. The suggested approach is not correct as far as my knowledge goes. So please ignore SonarCloud issue.