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

Development server - handle also the manifests.js file request #830

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

lslezak
Copy link
Contributor

@lslezak lslezak commented Oct 31, 2023

Problem

When running a local development server the list of display languages was empty:
agama_manifests_broken

The problem was that the manifests.js file request was not handled by the proxy and the browser received error 404. The manifests contain the list of supported languages.

Solution

Proxy the request to the real Cockpit server, but patch the response with the latest Agama manifest from the current sources. That ensures the supported languages are read from the current source code and not from the remote server (which might support less languages).

Testing

  • Tested manually
  • To test that injecting the current manifest.json file works I have added the Czech language to the local file (it is actually not supported)
    agama_manifests_fixed

Proxy the request to the real Cockpit server, but patch the
response with the latest Agama manifest from the current sources
@lslezak lslezak merged commit 655e957 into master Oct 31, 2023
10 checks passed
@lslezak lslezak deleted the devserver_manifests branch October 31, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants