Aias00 commented on code in PR #7709: URL: https://github.com/apache/shenyu/pull/7709#discussion_r4304998913
########## shenyu-bootstrap-http/src/main/resources/application.yml: ########## @@ -0,0 +1,77 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Minimal HTTP gateway configuration (issue #7649). +# Only what the divide HTTP proxy + websocket sync channel needs; +# everything else relies on ShenYu built-in defaults. + +server: + port: 9195 + address: 0.0.0.0 + +spring: + main: + allow-bean-definition-overriding: true + application: + name: shenyu-bootstrap-http + codec: + max-in-memory-size: 2MB + +management: + endpoint: + health: + enabled: true + show-details: always + endpoints: + web: + exposure: + include: + - 'health' + - 'info' + +shenyu: + # must match the namespace used by shenyu-admin (default seeded namespace) + namespace: 649330b6-c2d7-4edc-be8e-8a54df9eb385 + switchConfig: + local: true + collapseSlashes: false + file: + enabled: true + maxSize: 10 + cross: + enabled: true + allowedHeaders: + allowedMethods: "*" + allowedAnyOrigin: true Review Comment: `allowedAnyOrigin: true` plus `allowCredentials: true` (line 60) lets any site issue credentialed cross-origin requests to this gateway. `shenyu-bootstrap` does not ship that combination — please default both to the upstream values and document how to opt in. ########## shenyu-bootstrap-http/src/main/resources/application.yml: ########## @@ -0,0 +1,77 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Minimal HTTP gateway configuration (issue #7649). +# Only what the divide HTTP proxy + websocket sync channel needs; +# everything else relies on ShenYu built-in defaults. + +server: + port: 9195 + address: 0.0.0.0 + +spring: + main: + allow-bean-definition-overriding: true + application: + name: shenyu-bootstrap-http + codec: + max-in-memory-size: 2MB + +management: + endpoint: + health: + enabled: true + show-details: always + endpoints: + web: + exposure: + include: + - 'health' + - 'info' + +shenyu: + # must match the namespace used by shenyu-admin (default seeded namespace) + namespace: 649330b6-c2d7-4edc-be8e-8a54df9eb385 Review Comment: This value is exactly `Constants.SYS_DEFAULT_NAMESPACE_ID`. Hard-coding the constant's value in YAML duplicates it and will silently rot if the default changes — drop the line (the default applies) or make it `${SHENYU_NAMESPACE:...}` like the other overridable keys. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
