WASdev / ci.docker.websphere-traditional

Dockerfiles for WebSphere Application Server traditional
Apache License 2.0
171 stars 192 forks source link

Iframe isnt working after mapping in nginx #301

Closed fadel09 closed 11 months ago

fadel09 commented 11 months ago

I mapped my ip to 192.168.1.13:9443 in nginx but when I access my application it is giving

Refused to frame 'https://192.168.1.13:9443/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'". My configuration in nginx to map it is: location /{ proxy_pass https://192.168.1.13:9443; }

covener commented 11 months ago

I think you want to configure nginx to either replace references to the backend host with the frontend host, or configure it to pass $WSRH to the backend:

proxy_set_header "$WSRH" $host;
fadel09 commented 11 months ago

It still giving me the same error

covener commented 11 months ago

I don't think there is anything specific to the container image here. You'll have to debug how your browser has any idea about your backend IP address.

fadel09 commented 11 months ago

My backend is printing https://192.168.1.13:9443/ however my front have the ip 192.168.1.13

fadel09 commented 11 months ago

I added proxy_set_header Host $host; and it worked. Thanks for your time