Conversation
Collaborator
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
Collaborator
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
… browser OHTTP Introduce a unified HeaderPassthroughSpec for OHTTP header passthrough on both the egress (request) and ingress (response) sides, plus a CORS preflight fallback that forwards OPTIONS requests to the backend and sets Access-Control-Allow-Origin on key-config actuals when cors is unset. Together these let browsers issue OHTTP requests to TNG without being blocked by CORS preflight. - config: HeaderPassthroughSpec enum + unified OHTTP protected-header set; request_headers/response_headers on Egress/IngressHeaderPassthroughConfig - egress: plumb request_headers spec into OhttpServerApi; copy outer request headers (e.g. Origin) onto inner OHTTP request; use HeaderPassthroughSpec for response header passthrough; forward CORS preflight to backend and set ACAO on key-config actuals when cors unset - ingress: response_headers passthrough (outer->inner); switch request side to HeaderPassthroughSpec - tests: integration coverage for unified header_passthrough / "all" spec / CORS preflight forwarding, plus cors_fallback detection unit tests - docs: configuration + version_compatibility updates (bilingual), tng-wasm bilingual CORS guide for browser OHTTP requests, and clarified compatibility-change rules in CLAUDE.md Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Collaborator
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
Collaborator
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a unified
HeaderPassthroughSpecfor OHTTP header passthrough on both the egress (request) and ingress (response) sides, plus a CORS preflight fallback that forwardsOPTIONSrequests to the backend and setsAccess-Control-Allow-Originon key-config actuals whencorsis unset. Together these let browsers issue OHTTP requests to TNG without being blocked by CORS preflight.Changes
HeaderPassthroughSpecenum + unified OHTTP protected-header set;request_headers/response_headersonEgress/IngressHeaderPassthroughConfigrequest_headersspec intoOhttpServerApi; copy outer request headers (e.g.Origin) onto inner OHTTP request; useHeaderPassthroughSpecfor response header passthrough; forward CORS preflight to backend and set ACAO on key-config actuals whencorsis unsetresponse_headerspassthrough (outer→inner); switch request side toHeaderPassthroughSpecheader_passthrough/"all"spec / CORS preflight forwarding, pluscors_fallbackdetection unit testsconfiguration+version_compatibilityupdates (bilingual),tng-wasmbilingual CORS guide for browser OHTTP requests, and clarified compatibility-change rules inCLAUDE.mdCompatibility
No breaking change — existing configs parse unchanged.
version_compatibilitydocuments the additiveheader_passthrough/CORS-fallback behavior (no breaking rows).