Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Heng Qin committed Dec 19, 2023
1 parent b17e332 commit d5272f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ If you want to use a cross-origin filter for the Gravitino server, you can follo

```shell
wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlets/9.4.51.v20230217/jetty-servlets-9.4.51.v20230217.jar
cp jetty-servlets-9.4.51.v20230217.jar <gravitno home>/lib
cp jetty-servlets-9.4.51.v20230217.jar <gravitno home>/libs
```

You can refer to the [Configurations](gravitino-server-config.md) and append the configurations to the conf/gravitino.conf.

```text
gravitino.server.webserver.customFilter=org.eclipse.jetty.servlets.CrossOriginFilter
gravitino.server.webserver.customFilters=org.eclipse.jetty.servlets.CrossOriginFilter
gravitino.server.webserver.org.eclipse.jetty.servlets.CrossOriginFilter.param.allowedOrigins=*
```
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ public ThreadPool getThreadPool() {

public void addCustomFilters(String pathSpec) {
for (String filterName : serverConfig.getCustomFilters()) {
if (StringUtils.isBlank(filterName)) {
continue;
}
FilterHolder filterHolder = new FilterHolder();
filterHolder.setClassName(filterName);
for (Map.Entry<String, String> entry :
Expand Down

0 comments on commit d5272f5

Please sign in to comment.