-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
### What changes were proposed in this pull request? Add the support of custom filters referring to the Spark. ### Why are the changes needed? Some filters can be configured by users, the needs of users are different. Some filters are implemented by other libs. For example, Jetty has implemented the CORS filter, so we supported custom filters to satisfy the needs of users. Fix: #1190 ### Does this PR introduce _any_ user-facing change? Yes, I have added the document. ### How was this patch tested? test by the browser console I test Jetty's cors filter. Configuration ``` gravitino.server.webserver.customFilters=org.eclipse.jetty.servlets.CrossOriginFilter gravitino.server.webserver.org.eclipse.jetty.servlets.CrossOriginFilter.param.allowedOrigins=* ``` Browser console code ``` var http = new XMLHttpRequest(); var url = 'http://localhost:8090/api/version'; http.onreadystatechange = (e) => { console.log(http.responseText) } http.open("GET", url); http.send(); ``` --------- Co-authored-by: Heng Qin <[email protected]>
- Loading branch information
Showing
7 changed files
with
85 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters