• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Issue CORS Header does not apply to site

hello @TheDanniCraft ,

by default Plesk uses nginx as reverse proxy, so additional directives for apache may be not enough
and you need appropriate directives for nginx too (see the same article)
 
I added
Code:
location ~* \.(eot|ttf|woff|woff2)$ {
    add_header Access-Control-Allow-Origin "https://api.thedannicraft.de";
}
to nginnx statements but it doesn't worl
 
@TheDanniCraft , I feel that you should add just custom directive, without location, like on screenshot below
1650506410595.png

on my test machine it looks like below:
$ curl -v heavy02.a10-52-61-134.qa.plesk.com
* Trying 10.52.61.134:80...
* Connected to heavy02.a10-52-61-134.qa.plesk.com (10.52.61.134) port 80 (#0)
> GET / HTTP/1.1
> Host: heavy02.a10-52-61-134.qa.plesk.com
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 21 Apr 2022 02:01:18 GMT
< Content-Type: text/html
< Content-Length: 464
< Connection: keep-alive
< X-Accel-Version: 0.01
< Last-Modified: Fri, 15 Apr 2022 04:12:56 GMT
< ETag: "1d0-5dca9a011cd90"
< Accept-Ranges: bytes
< Access-Control-Allow-Origin: http://api.thedannicraft.de
< X-Powered-By: PleskLin
< Access-Control-Allow-Origin: http://api.thedannicraft.de
<
<!doctype html>
<html lang="en">
<head>
 
did you set appropriate nginx additional directives at the bottom of the page:
1650513990524.png
?
 
you should use https://api.thedannicraft.de for the nginx additional directives,
because you have 301 redirect to https turned ON.

also, please check that you're using correct URL for API calls (https://api.thedannicraft.de)
the problem may be caused by setting preferred site setting:

another one reason why web server configuration has not been yet applied may be that Plesk configured to reload web servers not right after some config was changed, but once per some time

manual nginx and apache restart should solve this.


if it does not help, well.. probably it would be better to reach technical support,
so our engineers will be able to investigate this problem more deeper.
 
I have that same problem. I tried restarting it didn't work.
you should use https://api.thedannicraft.de for the nginx additional directives,
because you have 301 redirect to https turned ON.

also, please check that you're using correct URL for API calls (https://api.thedannicraft.de)
the problem may be caused by setting preferred site setting:

another one reason why web server configuration has not been yet applied may be that Plesk configured to reload web servers not right after some config was changed, but once per some time

manual nginx and apache restart should solve this.


if it does not help, well.. probably it would be better to reach technical support,
so our engineers will be able to investigate this problem more deeper.
I have that same problem. I tried restarting it didn't work.
 
Back
Top