ํ์ฌ ๋ค์ ์ฌ์ฉ์ ์ ์ ์์ฑ์ OAS ์ ์์์ ์ง์๋ฉ๋๋ค. ๊ฒํ ํ๊ณ ๊ฐ์ ํ ์ฌํญ์ด ์์ผ๋ฉด ์ ์ํ์ญ์์ค.
x-wso2-auth-header: "Authorization"
x-throttling-tier: "Unlimited"
x-wso2-cors:
corsConfigurationEnabled: false
accessControlAllowOrigins:
- "*"
accessControlAllowCredentials: false
accessControlAllowHeaders:
- "authorization"
- "Access-Control-Allow-Origin"
- "Content-Type"
- "SOAPAction"
accessControlAllowMethods:
- "GET"
- "PUT"
- "POST"
- "DELETE"
- "PATCH"
- "OPTIONS"
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-basePath: "/sample/1.0.0"
x-wso2-transports:
- "http"
- "https"
๊ฐ ์๋ํฌ์ธํธ ์ ํ์ ๋ํ ๊ตฌ์ฑ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
HTTP
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
HTTP ์ฅ์ ์กฐ์น
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"
HTTP ๋ถํ ๋ถ์ฐ
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "load_balance"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "load_balance"
๋น๋
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
SOAP ์ฅ์ ์กฐ์น
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "failover"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "failover"
SOAP ๋ถํ ๋ถ์ฐ
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "load_balance"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "load_balance"
๊ธฐ๋ณธ ์๋ํฌ์ธํธ
x-wso2-production-endpoints:
endpoint_type: "default"
x-wso2-sandbox-endpoints:
endpoint_type: "default"
์ฐ๋ฆฌ๊ฐ ๋ฐ๊ฟ ์ ์์๊น์?
endpoint_type: "http" -> ์ ํ: "http"
๋ฆฌ์์ค์ ๋ํ ๋ณด์์ ๋นํ์ฑํํ๋ ค๋ฉด x-wso2-disable-security
๊ฐ ํ์ํฉ๋๋ค. https://github.com/wso2/product-microgateway#microgateway -supported-open-api-extensions
๋ณํ๊ฐ ํ์ํ๋ค
URL -> URL
x-throttling-tier: "๋ฌด์ ํ"
x-wso2-throttling-tier์ฌ์ผ ํฉ๋๋ค.
๋จ์ผ ๋์ ์ด๋ ์๋๋ ๊ทธ๊ฒ์ ๋ฐฐ์ด์ด์ด์ผ ํฉ๋๋ค.
url: "https://localhost:9443/publisher/apis/create/rest" ->
URL:
HTTP failover
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"
๋ก ๋ณ๊ฒฝํด์ผ ํฉ๋๋ค
HTTP failover
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
type: "failover"
๋ก๋ ๋ฐธ๋ฐ์ฑ ์๋ํฌ์ธํธ๋ ๋ง์ฐฌ๊ฐ์ง์ ๋๋ค.
๋ฆฌ์์ค์ ๋ํ ๋ณด์์ ๋นํ์ฑํํ๋ ค๋ฉด
x-wso2-disable-security
๊ฐ ํ์ํฉ๋๋ค. https://github.com/wso2/product-microgateway#microgateway -supported-open-api-extensions
@praminda ์ด ์ ๋ณด๋ ์ด๋ฏธ 'x-auth-type'์ด๋ผ๋ ์ด๋ฆ์ผ๋ก ์์ต๋๋ค. ์ฌ์ฌ์ฉํ ์ ์๋์?
x-throttling-tier: "๋ฌด์ ํ"
x-wso2-throttling-tier์ฌ์ผ ํฉ๋๋ค.
@hasuniea ์ด ์ ๋ณด๋ ์ด๋ฏธ 'x-throttling-tier'๋ผ๋ ์ด๋ฆ์ผ๋ก ์์ต๋๋ค. ์์ก์ ์ ๊ธฐํ ์ ์์ต๋๊น? ๊ทธ๋ ์ง ์์ผ๋ฉด ์ค์จ๊ฑฐ์ ์ค๋ณต ์ ๋ณด๊ฐ ์์ต๋๋ค.
x-์กฐ์ ๊ณ์ธต
ํ์ฌ ๋ง์ดํฌ๋ก ๊ฒ์ดํธ์จ์ด๋ x-throttling-tier๋ฅผ ์ง์ํ๋ฏ๋ก ๋ฐ์ดํฐ ์ค๋ณต์ด๋ฏ๋ก ๊ทธ๋๋ก ์ ์งํ ์ ์๋ค๊ณ ๊ฐ์ ํฉ๋๋ค.
x ์ธ์ฆ ์ ํ
์, MGW์์ ์ง์ํ๋ฏ๋ก ์ด ํ์ฅ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
์ด ๋ฌธ์ ๋ ์์ ๋์์ต๋๋ค. ๋ฐ๋ผ์ ํ์.