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

fix http fileserver routes for console #3978

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

jeevb
Copy link
Contributor

@jeevb jeevb commented Aug 21, 2023

No description provided.

@jeevb jeevb marked this pull request as ready for review August 21, 2023 15:34
Comment on lines +19 to +26
// Serve requests for static assets at `/console/assets/<filename>`
// as-is from `dist`
if strings.HasPrefix(name, consoleStatic) {
return filepath.Join(packageDir, strings.TrimPrefix(name, consoleStatic))
}
return packageDir + name

// Send all other requests to `index.html` to be handled by react router
return filepath.Join(packageDir, indexHTML)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for implementing this.

@wild-endeavor wild-endeavor merged commit 36c81df into master Aug 21, 2023
@wild-endeavor wild-endeavor deleted the jeev/fix-console-fileserver branch August 21, 2023 21:25
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.

5 participants