-
Notifications
You must be signed in to change notification settings - Fork 66
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
"zed serve" flag to specify additional AllowedOrigins #4297
Comments
The -cors.origins flag accepts a comma-separated list of CORS allowed origins. Closes #4297.
The -cors.origin flag specifies a CORS allowed origin. The flag may be repeated. This change removes the two baked-in allowed origins, *.observableusercontent.com and localhost, and replaces them with a default allowed origin of *. As a consequence, "zed serve" with no -cors.origin flag behaves like "zed serve -cors.origin '*'". Closes #4297.
Verified in Zed commit 3ca4b8a. The attached video shows it working as needed with the prototype Grafana plugin described in the opened issue text. That plugin which calls out to the Verify.mp4Issue brimdata/zui#2639 has been opened track eventually adding a setting in the app's Preferences to invoke this flag on the Thanks @nwt! |
As described in the README for the prototype Zed data source Grafana plugin, such a plugin cannot currently query an out-of-the-box Zed service because the CORS configuration does not permit requests from the
http://localhost:3000
origin.As an interim hack, I was able to get it working in branch by adding the additional entry for
http://localhost:3000
here:https://github.com/brimdata/zed/blob/52c5061b6fbbe9abd1dd754d240104cca647c5aa/service/middleware.go#L33
In a discussion with the team, we agreed that we should introduce a flag to allow this, e.g.,
zed serve -origin http://localhost:3000
. It seems like a flag that the user should be able to invoke multiple times on the same command line so multiple additional origins can be specified, similar to what we do with multiple includes onzed query -I
.The text was updated successfully, but these errors were encountered: