Open atlasloewenherz opened 2 years ago
Same happens in 0.16.2
Same issues without docker as well... (on 0.16.2).
Ok I found how to make the stuff working. On the nginx used to serve netmaker-ui you should add the following :
add_header 'Access-Control-Allow-Origin' '*.netmaker.your.domain.com' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
This is really a shame the documentation about this part is not up to date (or non existant...).
Still happening in 0.16.3 using the Docker installation
I've found that for the Docker installation you cannot specify the CORS domain. This fails:
CORS_ALLOWED_ORIGIN: "*.netmaker.yourdomain.com"
This works:
CORS_ALLOWED_ORIGIN: "*"
Contact Details
yassine.elassad@gmail.com
What happened?
i have the following setup:
following are traefik file based configs as mentioned in the diagramm:
in the environment variables of netmaker/api container i have the following for :
i tried all the combinations i could think of for
NM_CORS_ALLOWED_ORIGIN: *.nm.domain.tld :-1:
NM_CORS_ALLOWED_ORIGIN: ui.nm.domain.tld :-1:
NM_CORS_ALLOWED_ORIGIN: *.domain.tld :-1:
NM_CORS_ALLOWED_ORIGIN: * :-1:
all the variation ends with the problem that ui.nm.domain.tld is resticted accessing api.nm.domain.tld so i end up with :
Version
v0.16.1
What OS are you using?
Linux
Relevant log output
Contributing guidelines