getodk / central

ODK Central is a server that is easy to use, very fast, and stuffed with features that make data collection easier. Contribute and make the world a better place! ✨🗄✨
https://docs.getodk.org/central-intro/
Apache License 2.0
121 stars 145 forks source link

Generate Frontend config and serve it #657

Closed matthew-white closed 1 month ago

matthew-white commented 2 months ago

This PR makes progress on getodk/central#656. It generates the Frontend config and serves it so that Frontend can then fetch it. The corresponding Frontend PR is getodk/central-frontend#988.

What has been done to verify that this works as intended?

So far just that CI passes. Once it's on staging, I can double-check that /client-config.json is served correctly.

Why is this the best possible solution? Were any other approaches considered?

I'm going to leave comments about a few lines.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

getodk/central-frontend#988 mentions the cost of an additional request. I don't think it will be much of an issue.

Before submitting this PR, please make sure you have:

matthew-white commented 1 month ago

Once it's on staging, I can double-check that /client-config.json is served correctly.

I can see that client-config.json is served and that its content matches my expectation: https://staging.getodk.cloud/client-config.json