Store Locator Plus® for WordPress › Forums › Premier Support › 401 For wp-json Request URL
- This topic has 3 replies, 2 voices, and was last updated 7 years ago by Cici.
-
AuthorPosts
-
February 5, 2019 at 4:58 PM #58630MickeyParticipant
Hey Everyone
So we may have a very unique WordPress setup but am hoping that there is a solution to our issues. We have recently upgraded to the newest version of Store Locator Plus and out Maps have started to give us 401 issues. After doing some digging into the situation we believe we have found the issue.
Current WordPress Setup:
– Not multisite but multi domain setup
– Parent DNS with multiple additional DNS’s that share a mix of content and templating.
Current findings:
Child Website makes initial request for maps and it works as the Response Header for Access-Control-Allow-Headers gets set to the child DNS.
Upon clicking and requesting information for a different zip code or location we are receiving a 401 unauthorized. Now what we are finding is the new request to wp-json is using the parent DNS and not the child DNS. So the Access-Control-Allow-Headers is blocking the request as you cannot set this to 2 different settings.
Our work around for many other things was to use relative URL pathing for all items in the WordPress website. So parent.com/something in a href would only show up as /something and would ignore the DNS.
Unfortunately the SLP plugin is not allowing for other relative URL plugins to make this request relative and it is coming in static.
Any suggestions?
February 6, 2019 at 1:49 PM #58637CiciKeymasterWe cannot provide specific suggestions for this since the SLP plugin uses the built-in WordPress rest_url() method which breaks some sites with “unique” (non-stanard configurations).
February 12, 2019 at 12:53 PM #58732CiciKeymasterThe developer just wrote an article about Nginx re-route when using subdirectores under his personal blog . I can send you a link via email for you to review. Let us know Not sure if it is the type of info you are looking for
- This reply was modified 7 years ago by Cici.
February 12, 2019 at 1:30 PM #58734CiciKeymasterThe latest news article
https://www.storelocatorplus.com/wordpress-subdirectory-installs-and-the-rest-api/
-
AuthorPosts
- You must be logged in to reply to this topic.
