You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unrecognized Content-Security-Policy directive 'prefetch-src'.
Access to XMLHttpRequest at 'https://api.example.com/api-version' from origin 'https://app.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://api.example.com/api-version net::ERR_FAILED 200
allowlisted_origins: app (as your webapp is served there) added this to the values.yaml files but getting below error when deployed.
nginz:
replicaCount: 3
config:
ws:
useProxyProtocol: false
# images:
# nginz:
# tag: some-tag (only override if you want a newer/different version than what is in the chart)
nginx_conf:
# using prod means mostly that some internal endpoints are not exposed
env: prod
allowlisted_origins: app
external_env_domain: example.com
deeplink:
endpoints:
backendURL: "https://api.example.com"
backendWSURL: "https://wss.example.com"
teamsURL: "https://teams.example.com"
accountsURL: "https://account.example.com"
blackListURL: "https://clientblacklist.example.com/prod"
websiteURL: "https://example.com"
title: "My Custom example Backend"
bash-5.1# helm upgrade --install --namespace production wire-server wire/wire-server -f values/wire-server/values.yaml -f values/wire-server/secrets.yaml --wait
Error: UPGRADE FAILED: template: wire-server/charts/nginz/templates/deployment.yaml:27:31: executing "wire-server/charts/nginz/templates/deployment.yaml" at <include (print .Template.BasePath "/configmap.yaml") .>: error calling include: template: wire-server/charts/nginz/templates/configmap.yaml:4:4: executing "wire-server/charts/nginz/templates/configmap.yaml" at <include "nginz_nginx.conf" .>: error calling include: template: wire-server/charts/nginz/templates/conf/_nginx.conf.tpl:131:31: executing "nginz_nginx.conf" at <.Values.nginx_conf.allowlisted_origins>: range can't iterate over app
nginz:
replicaCount: 3config:
ws:
useProxyProtocol: false# images:# nginz:# tag: some-tag (only override if you want a newer/different version than what is in the chart)nginx_conf:
# using prod means mostly that some internal endpoints are not exposedenv: prodallowlisted_origins:
- app
...
BTW, there are more web application you may want to use (e.g. account-pages.) If you run into the same issue with one of them, you'll have to add them to the same list.
@akshaymankar any idea about this issue. I am unable to send request to any person. When I click on the connect button, I am getting above error in the network and console of browser.
nginz:
replicaCount: 3config:
ws:
useProxyProtocol: false# images:# nginz:# tag: some-tag (only override if you want a newer/different version than what is in the chart)nginx_conf:
# using prod means mostly that some internal endpoints are not exposedenv: prodallowlisted_origins:
- app
...
Even after add these values, getting CORS issues with GIF's
/#/conversation/9b1a0e40-aa0d-498f-8106-54a76b0508c6/federator.example.com:1 Access to XMLHttpRequest at 'https://api.example.com/v3/proxy/giphy/v1/gifs/search?limit=100&offset=0&q=Hello' from origin 'https://app.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
nginz:
replicaCount: 3
config:
ws:
useProxyProtocol: false
# images:
# nginz:
# tag: some-tag (only override if you want a newer/different version than what is in the chart)
nginx_conf:
# using prod means mostly that some internal endpoints are not exposed
env: prod
allowlisted_origins:
- app
- teams
- wss
- account
- clientblacklist
- api
external_env_domain: example.com
deeplink:
endpoints:
backendURL: "https://api.example.com"
backendWSURL: "https://wss.example.com"
teamsURL: "https://teams.example.com"
accountsURL: "https://account.example.com"
blackListURL: "https://clientblacklist.example.com/prod"
websiteURL: "https://example.com"
title: "My Custom example Backend"
nginz:
replicaCount: 3config:
ws:
useProxyProtocol: false# images:# nginz:# tag: some-tag (only override if you want a newer/different version than what is in the chart)nginx_conf:
# using prod means mostly that some internal endpoints are not exposedenv: prodallowlisted_origins:
- app
...
Even after add these values, getting CORS issues with GIF's
/#/conversation/9b1a0e40-aa0d-498f-8106-54a76b0508c6/federator.example.com:1 Access to XMLHttpRequest at 'https://api.example.com/v3/proxy/giphy/v1/gifs/search?limit=100&offset=0&q=Hello' from origin 'https://app.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
nginz:
replicaCount: 3
config:
ws:
useProxyProtocol: false
# images:
# nginz:
# tag: some-tag (only override if you want a newer/different version than what is in the chart)
nginx_conf:
# using prod means mostly that some internal endpoints are not exposed
env: prod
allowlisted_origins:
- app
- teams
- wss
- account
- clientblacklist
- api
external_env_domain: example.com
deeplink:
endpoints:
backendURL: "https://api.example.com"
backendWSURL: "https://wss.example.com"
teamsURL: "https://teams.example.com"
accountsURL: "https://account.example.com"
blackListURL: "https://clientblacklist.example.com/prod"
websiteURL: "https://example.com"
title: "My Custom example Backend"
/#/conversation/9b1a0e40-aa0d-498f-8106-54a76b0508c6/federator.example.com:1 Access to XMLHttpRequest at 'https://api.example.com/v3/proxy/giphy/v1/gifs/search?limit=100&offset=0&q=Hello' from origin 'https://app.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
On Fri, Jun 30, 2023 at 4:20 PM ramesh8830 ***@***.***> wrote:
Deployed the server in production environment with metallb load balancer.
But having issues with CORS.
Below are my CSP headers in webapp values.yaml
CSP_EXTRA_CONNECT_SRC: "https://*.example.com, wss://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_IMG_SRC: "https://*.example.com, wss://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_SCRIPT_SRC: "https://*.example.com, wss://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_DEFAULT_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_FONT_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_FRAME_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_MANIFEST_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_OBJECT_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_MEDIA_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_PREFETCH_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_STYLE_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CSP_EXTRA_WORKER_SRC: "https://*.example.com, https://*.giphy.com, https://s3.us-east-1.amazonaws.com"
CORS Errors on the browser console
Unrecognized Content-Security-Policy directive 'prefetch-src'.
Access to XMLHttpRequest at 'https://api.example.com/api-version' from origin 'https://app.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://api.example.com/api-version net::ERR_FAILED 200
Kubernetes Version
:~# kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:15:20Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Wire Webapp Image used
image:
repository: quay.io/wire/webapp
tag: "2023-04-11-production.0-v0.31.13-0-bb91157"
Please help me fix the CORS issue.
I have added the necessary headers already. But still having issues with
only GIF's. All others are working fine.
—
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEAMAATSKGBRQ2SJ5IJYT4DXN3VDDANCNFSM6AAAAAAZXFA3QI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
Activity
supersven commentedon Jun 28, 2023
@ramesh8830 The
Access-Control-Allow-Originheader is set bynginz(andcannon'snginxin some special cases.)Could you please check these Values:
nginz.nginx_conf.allowlisted_originsnginz.nginx_conf.nginx_conf.external_env_domainramesh8830 commentedon Jun 28, 2023
@supersven I am sorry, I am new to kubernetes and this wire server deployment.
Please guide me how to and where to check these values.
supersven commentedon Jun 28, 2023
@ramesh8830 You should have some yaml file or files where you put all config values. The dots (
.) refer to nodes in this yaml file.E.g. Link to
nginz.nginx_conf.nginx_conf.external_env_domainif you are using the demo setup values.I think you need to set:
allowlisted_origins:app(as yourwebappis served there)external_env_domain:example.com(as this is your domain)This should give you
Access-Control-Allow-Originheaders, when a requests origin ishttps://app.example.com.Hope this helps 😃
ramesh8830 commentedon Jun 28, 2023
allowlisted_origins: app (as your webapp is served there)added this to the values.yaml files but getting below error when deployed.supersven commentedon Jun 28, 2023
Ah, sorry, it's a list in yaml. E.g.
The default
values.yamlfile of the Helm chart provides some documentation: https://github.com/wireapp/wire-server/blob/develop/charts/nginz/values.yaml#L71ramesh8830 commentedon Jun 28, 2023
@supersven It worked. Thank you so much for your help
Have a great day ahead.
supersven commentedon Jun 28, 2023
@ramesh8830 Welcome 😄
BTW, there are more web application you may want to use (e.g.
account-pages.) If you run into the same issue with one of them, you'll have to add them to the same list.May I close this ticket?
ramesh8830 commentedon Jun 28, 2023
Yeah. I have used the app, teams and account in there. but I am not getting Pro account creation like we have in the older version.
Old version like below and able to create Pro accounts.
Please let me know if you have any idea about how to activate that.
supersven commentedon Jun 28, 2023
According to @julialongtin this is only a change in the label.
ramesh8830 commentedon Jun 28, 2023
In the old version of wire, url for pro account is https://app.exacmple.com/auth/#createteam
But in the new version it is redirecting to https://teams.example.com/register/email which lead me to 404 error
ramesh8830 commentedon Jun 28, 2023
unable to send connection request. getting below error.
ramesh8830 commentedon Jun 28, 2023
Please help me on the above. I did not enable federation and legalhold
akshaymankar commentedon Jun 29, 2023
I haven't tested this, but I think you can set this environment variable in the webapp helm chart to restore the previous behaviour:
ramesh8830 commentedon Jun 29, 2023
@akshaymankar any idea about this issue. I am unable to send request to any person. When I click on the connect button, I am getting above error in the network and console of browser.
Please let me know
akshaymankar commentedon Jun 29, 2023
I think only logs from brig can tell us why it is throwing a 500.
ramesh8830 commentedon Jun 29, 2023
Please find the brig when I tried to hit the connect button.
ramesh8830 commentedon Jun 29, 2023
I found the problem. I had a bad url for fedaration domain for gally pod values.
Thanks..
ramesh8830 commentedon Jun 29, 2023
this is not working
keeps redirecting to https://teams.example.com/register/email
ramesh8830 commentedon Jun 29, 2023
Even after add these values, getting CORS issues with GIF's
/#/conversation/9b1a0e40-aa0d-498f-8106-54a76b0508c6/federator.example.com:1 Access to XMLHttpRequest at 'https://api.example.com/v3/proxy/giphy/v1/gifs/search?limit=100&offset=0&q=Hello' from origin 'https://app.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.ramesh8830 commentedon Jun 30, 2023
@julialongtin @akshaymankar @supersven any help on this please?
/#/conversation/9b1a0e40-aa0d-498f-8106-54a76b0508c6/federator.example.com:1 Access to XMLHttpRequest at 'https://api.example.com/v3/proxy/giphy/v1/gifs/search?limit=100&offset=0&q=Hello' from origin 'https://app.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.julialongtin commentedon Jun 30, 2023
look at the extra CSP headers that are being handed out by the webapp.
https://github.com/wireapp/wire-server-deploy/blob/master/values/wire-server/prod-values.example.yaml#L250
ramesh8830 commentedon Jun 30, 2023
I have added the necessary headers already. But still having issues with only GIF's. All others are working fine.
julialongtin commentedon Jun 30, 2023
ramesh8830 commentedon Jun 30, 2023
ramesh8830 commentedon Jul 3, 2023
@julialongtin anything wrong with my values.yaml?
julialongtin commentedon Jul 3, 2023
nothing sticks out to me. I'll load it up into an environment and poke it here, but it will take me a few days. other priorities, etc.
ramesh8830 commentedon Jul 3, 2023
Looking for your help @julialongtin.
Please help me
ramesh8830 commentedon Jul 10, 2023
Hi @julialongtin
have you tried it?
Please help me
ramesh8830 commentedon Jul 19, 2023
any update?