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.
Source: https://developer.chrome.com/blog/private-network-access-update/
For more and up to date details on how it works, implementation timeline on the part of Google Chrome, please check out the link provided.
To summarize briefly:
When the browser notices that a website A wants to request a resource from website B and website B is a website in private IP space, the browser sends a additional headers in the Preflight request (along with CORS headers, if any).
The header
Access-Control-Request-Private-Network: true
is the one we are concerned with here.If the server behind website B wants to allow this request, then it has to respond with status code 200 / 204 and the response header
Access-Control-Allow-Private-Network: true
.This PR implements the standard in this great bundle to allow or deny (default) Private Network Access with the appropriate header.
Users may set
allow_private_network: true
in nelmio_cors.yaml to instruct the bundle to setAccess-Control-Allow-Private-Network: true
for Preflight requests containingAccess-Control-Request-Private-Network: true
.