skimdz86 opened a new pull request, #9365:
URL: https://github.com/apache/apisix/pull/9365

   ### Description
   
   Implements feature described in issue 
https://github.com/apache/apisix/issues/9307: added support  to the 
Timing-Allow-Origin header in the CORS plugin.
   
   The new header can be configured with a list of domains or a regex, just as 
the Access-Control-Allow-Origin.
   The new header is returned only if the Access-Control-Allow-Origin is 
returned.
   
   I added a new parameter to the 2 functions process_with_allow_origins and 
process_with_allow_origins_by_regex to make these functions "common" and now 
used both for calculating the Access-Control-Allow-Origin and the 
Timing-Allow-Origin header; the new "allow_origin_type" parameter was essential 
to differentiate the cache used to save the elaboration results for the 2 
different headers.
    
   **Note**: I updated also the markdown documentation (english version) adding 
the 2 new configuration fields, but unfortunately I don't speak Chinese, so any 
help for updating also the /docs/zh/latest/plugins/cors.md file will be 
appreciated.
   
   Fixes #9307  
   
   ### Checklist
   
   - [X] I have explained the need for this PR and the problem it solves
   - [X] I have explained the changes or the new features added to this PR
   - [X] I have added tests corresponding to this change
   - [X] I have updated the documentation to reflect this change
   - [X] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   
   


-- 
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]

Reply via email to