How to optimize the request speed (NGINX) of OPTIONS when making cross-domain requests

because the interface involves cross-domain problems, nearly 600ms per interface request is a waste of time for OPTIONS requests. How to optimize this process, for example, nginx configuration returns directly across domains without program processing (php)

Php
Mar.03,2021

Cross-domain also follow the ngx? of your local domain Or is your local ngx acting as a cross-domain proxy?

< hr >

ngx setting:

if ($request_method = OPTIONS ) {
    add_header Access-Control-Allow-Origin "*";
    add_header Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, DELETE";
    add_header Access-Control-Max-Age "3600";
    add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization";
    add_header Content-Length 0;
    add_header Content-Type text/plain;
    return 200;
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb23fb-23bc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb23fb-23bc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?