Skip to content

Commit

Permalink
Update production.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jessuppi authored Feb 9, 2025
1 parent 5507d70 commit 667f315
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/nginx/sites/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ location ~* \.(asp|aspx|doc|docx|dwf|gpx|hwp|jsp|kml|kmz|log|odp|ods|odt|pdf|ppt
# limit_req_status 429;
# }

## ensure proper handling and prevent 403 errors with wp-json ##
## handle wordpress wp-json requests ##
location ~ ^/wp-json/ {
## prevent caching for dynamic responses ##
add_header Cache-Control "no-cache, must-revalidate, max-age=0, no-store, private";
Expand All @@ -310,8 +310,8 @@ location ~* \.(asp|aspx|doc|docx|dwf|gpx|hwp|jsp|kml|kmz|log|odp|ods|odt|pdf|ppt
## skip fastcgi cache for all wp-json requests ##
set $skip_cache 1;

## rewrite requests to query string format if permalinks are not enabled ##
rewrite ^/wp-json/(.*?)$ /?rest_route=/$1 last;
### ensure wordpress process requests ##
try_files $uri /index.php?$args;
}

####################################################################################################
Expand Down

0 comments on commit 667f315

Please # to comment.