- Joined
- Sep 12, 2016
- Messages
- 28
- Likes
- 4
- Degree
- 0
Hello Builders,
Is there a way to exclude api requests only and let those come through as http, I force all my traffic thru https via my nginx site config (see code below) but I need to exclude all requests to xx.com/wc-api/v3 (api doesn't work if I 301 Move it)
The other option is to allow both http and https to the entire site but if it is possible to exclude only the api request it would be wayy better!
Thanks in advance and appreciate your help
EDIT: found some ideas but don't know how to implement them:
1) Enforcing https for every url except those with api/wc-api keyword inside.
2) Fix it with a custom redirect
From:
Here's the nginx config:
Is there a way to exclude api requests only and let those come through as http, I force all my traffic thru https via my nginx site config (see code below) but I need to exclude all requests to xx.com/wc-api/v3 (api doesn't work if I 301 Move it)
The other option is to allow both http and https to the entire site but if it is possible to exclude only the api request it would be wayy better!
Thanks in advance and appreciate your help
EDIT: found some ideas but don't know how to implement them:
1) Enforcing https for every url except those with api/wc-api keyword inside.
2) Fix it with a custom redirect
From:
Here's the nginx config:
Code:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name xx.com www.xx.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
include snippets/ssl-params.conf;
...etc
Last edited: