Question 170
A model API sends a session cookie from a browser hosted on another origin and is blocked only in browsers. Which engineering change is the most direct response to the stated failure and constraint?
Explanation
Correct Answer
This remedy fits the observed case: A model API sends a session cookie from a browser hosted on another origin and is blocked only in browsers. Configure precise CORS origins and credential policy for the permitted frontend instead of a wildcard. The underlying issue is A wildcard cross-origin policy is incompatible with credentialed browser requests. Direct acceptance evidence is The approved browser origin succeeds with credentials while an unlisted origin fails CORS checks.
Incorrect Answers
The alternative addresses: The host-to-container port mapping does not match the application's listening socket. The reported constraint here is different: A wildcard cross-origin policy is incompatible with credentialed browser requests. The case-specific choice is: Configure precise CORS origins and credential policy for the permitted frontend instead of a wildcard.
Nonsticky application settings would carry the staging credential into production. By contrast, the relevant technical condition here is: A wildcard cross-origin policy is incompatible with credentialed browser requests. The appropriate selection is: Configure precise CORS origins and credential policy for the permitted frontend instead of a wildcard.
Missing container runtime logs conceal the first exception that terminates the process. This is a separate requirement; the current case instead hinges on: A wildcard cross-origin policy is incompatible with credentialed browser requests. The matching answer is: Configure precise CORS origins and credential policy for the permitted frontend instead of a wildcard.