Skip to content

Conversation

allanmcarvalho
Copy link
Contributor

Added an example to the Nginx configuration in the documentation showing how to forward OPTIONS requests to Laravel. This ensures that CORS preflight requests are handled by the application instead of Nginx:

# If you want to handle cors in the application instead of Nginx
if ($request_method = OPTIONS) {
    rewrite ^ /index.php last;
}

Added an example to the Nginx configuration in the documentation showing how to forward OPTIONS requests to Laravel.  
This ensures that CORS preflight requests are handled by the application instead of Nginx:

    # If you want to handle cors in the application instead of Nginx
    if ($request_method = OPTIONS) {
        rewrite ^ /index.php last;
    }
@taylorotwell
Copy link
Member

Not sure this is totally necessary in our docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants