Skip to content

Commit b247c38

Browse files
committed
Added security restrictions on the new connection filter postgraphile plugin
1 parent fbab379 commit b247c38

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

api/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ function createOptions() {
6262
postgraphileOptions.jwtSecret = "DEV";
6363
postgraphileOptions.showErrorStack = "json" as const;
6464
postgraphileOptions.extendedErrors = ["hint", "detail", "errcode"];
65+
66+
postgraphileOptions.graphileBuildOptions = {
67+
connectionFilterAllowedOperators: ["includesInsensitive"],
68+
connectionFilterAllowedFieldTypes: ["String"],
69+
connectionFilterComputedColumns: false,
70+
connectionFilterSetofFunctions: false,
71+
connectionFilterArrays: false,
72+
};
6573
}
6674
return postgraphileOptions;
6775
}

0 commit comments

Comments
 (0)