#2975-Suggestion-Add-Permissions-Policy-as-configurable-option-to-SecureHeaders-GatewayFilter
- added Permissions-Policy header as an opt-in header & default value - updated documentation with Permissions-Policy and resources - updated tests to include Permissions-Policy - SecurityHeaders and Permissions-Policy may be configured globally / per route - updated structure of public methods and class members to match previous version structure Fixes gh-2975 Signed-off-by: Jörg Richter <96986086+joerg-richter-5234@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
test:
|
||||
hostport: httpbin.org:80
|
||||
# hostport: localhost:5000
|
||||
uri: http://${test.hostport}
|
||||
#uri: lb://httpbin
|
||||
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
gateway:
|
||||
filter:
|
||||
default-filters:
|
||||
#- PrefixPath=/httpbin
|
||||
#- AddResponseHeader=X-Response-Default-Foo, Default-Bar
|
||||
|
||||
routes:
|
||||
# =====================================
|
||||
# to run server
|
||||
# $ wscat --listen 9000
|
||||
# to run client
|
||||
# $ wscat --connect ws://localhost:8080/echo
|
||||
- id: websocket_test
|
||||
uri: ws://localhost:9000
|
||||
order: 9000
|
||||
predicates:
|
||||
- Path=/echo
|
||||
# =====================================
|
||||
- id: default_path_to_httpbin_secureheaders
|
||||
uri: ${test.uri}
|
||||
order: 10000
|
||||
predicates:
|
||||
- Path=/**
|
||||
filters:
|
||||
- name: SecureHeaders
|
||||
args:
|
||||
disable: x-frame-options
|
||||
enable: permissions-policy
|
||||
permissions-policy : geolocation=("https://example.net")
|
||||
|
||||
logging:
|
||||
level:
|
||||
org.springframework.cloud.gateway: TRACE
|
||||
org.springframework.http.server.reactive: DEBUG
|
||||
org.springframework.web.reactive: DEBUG
|
||||
reactor.ipc.netty: DEBUG
|
||||
reactor.netty: DEBUG
|
||||
|
||||
management.endpoints.web.exposure.include: '*'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user