]> git.feebdaed.xyz Git - 0xmirror/civetweb.git/commit
Add `replace_asterisk_with_origin` option for Acces-Control-Allow-Origin
authorMarcel F. <Marcel-Kyra@web.de>
Wed, 13 Aug 2025 08:46:10 +0000 (10:46 +0200)
committerGitHub <noreply@github.com>
Wed, 13 Aug 2025 08:46:10 +0000 (10:46 +0200)
commitdb3aebf784da75d8fd7fae8ddc5a03dc4a787ff0
tree9c94ca398121c4fed3529147d2c9e38fcb219e2f
parent5864b55a94f4b5238155cbf2baec707f0fa2ba6d
Add `replace_asterisk_with_origin` option for Acces-Control-Allow-Origin

If you have multiple allowed origins and require `allow_credentials` to be true, CORS might be a problem since it blocks all requests with Allow-Origin "*" in combination with Credentials. Therefore this feature adds a config paramter `replace_asterisk_with_origin`. If it is set to `yes` and the passed `Access-Control-Allow-Origin` is an asterisk, this will be replaced by the origin of the request in the corresponding response.
src/civetweb.c