-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: add dynamic cors support #6174
Conversation
Signed-off-by: பாலாஜி <balaji@dgraph.io>
Signed-off-by: பாலாஜி <balaji@dgraph.io>
add list based schema Signed-off-by: Balaji <rbalajis25@gmail.com>
Signed-off-by: பாலாஜி <balaji@dgraph.io>
Signed-off-by: பாலாஜி <balaji@dgraph.io>
…aji/cors Signed-off-by: Balaji <rbalajis25@gmail.com>
Signed-off-by: Balaji <rbalajis25@gmail.com>
Signed-off-by: Balaji <rbalajis25@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looking good, I'll approve. Just check and address the comments. Also, check with @gja about the behavior after DROP_ALL and DROP_DATA.
Reviewed 1 of 8 files at r1, 3 of 7 files at r2, 1 of 5 files at r4, 4 of 8 files at r6, 9 of 10 files at r7, 9 of 9 files at r8.
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on @balajijinnah, @gja, @manishrjain, @MichaelJCompton, and @vvbalaji-dgraph)
edgraph/server.go, line 89 at r8 (raw file):
// AuthorizeCors is used to indicate that the given request is authorized to do // cors mutation. AuthorizeCors
CorsMutationAllowed
edgraph/server.go, line 357 at r8 (raw file):
// recreate the admin account after a drop data operation ResetAcl() ResetCors()
Should not be dropped on DROP_ALL and DROP_DATA
edgraph/server.go, line 1224 at r8 (raw file):
} func authorizeCors(ctx context.Context, qc *queryContext) error {
validateCorsInMutation
edgraph/server.go, line 1621 at r8 (raw file):
} corsRes := &corsResponse{} fmt.Println(string(res.Json))
remove this
edgraph/server.go, line 1625 at r8 (raw file):
return nil, err } //x.AssertTrue(len(corsRes.Me) == 1)
Print a glog.Error
if len > 1
graphql/admin/cors.go, line 86 at r8 (raw file):
// arrayToInterface convers array string to array interface func arrayToInterface(in []string) []interface{} {
rather than doing this fix it in completeObject
in graphql/resolve/resolver.go
graphql/e2e/custom_logic/custom_logic_test.go, line 191 at r8 (raw file):
result := params.ExecuteAsPost(t, alphaURL) if result.Errors != nil {
remove
graphql/e2e/normal/normal_test.go, line 214 at r8 (raw file):
"list": true, "index": true, "tokenizer": [
formatting is messed up
graphql/web/http.go, line 349 at r8 (raw file):
w.Header().Set("Access-Control-Allow-Headers", x.AccessControlAllowedHeaders) w.Header().Set("Access-Control-Allow-Credentials", "true") w.Header().Set("Connection", "close")
this should be returned in all cases?
I think it's best if DROP_DATA retains this data. If it's possible and not something that takes forever to implement. Also, could we rename the methods too include the word origins?
|
Signed-off-by: பாலாஜி <balaji@dgraph.io>
Signed-off-by: பாலாஜி <balaji@dgraph.io>
Signed-off-by: Balaji <rbalajis25@gmail.com>
Signed-off-by: பாலாஜி <balaji@dgraph.io>
Signed-off-by: பாலாஜி <balaji@dgraph.io>
Signed-off-by: பாலாஜி <balaji@dgraph.io>
Signed-off-by: பாலாஜி <balaji@dgraph.io>
This PR introduced a bunch of issues in which Alpha server would not shut down correctly, @pawanrawal . |
Signed-off-by: பாலாஜி balaji@dgraph.io
This change is
Docs Preview: