feature: 在 script
拦截器配置相对地址和绝对地址时,自动生成一些相关的辅助拦截配置,避免相对地址和绝对地址引起的跨域问题和脚本 content-type
限制问题。
#298
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.
Ⅰ. 描述此PR的作用:
feature: 在
script
拦截器配置相对地址和绝对地址时,自动生成一些相关的辅助拦截配置,解决以下问题:content-type
限制问题Ⅱ. 原理说明:
1. 当使用script配置绝对地址时,将会生成相对的伪脚本地址,并为该伪脚本地址生成代理配置,如下:
原配置:
自动替换为:
2. 当使用script配置相对地址时,将会生成响应头替换配置,如下:
原配置:
自动增加响应头替换配置:
Ⅲ. 此PR解决了什么问题?
降低了新特性 #294 配置复杂性。