I am embeding an iframe that uses another port.
I need to inject a css in the iframe but Chrome doesn't let me because of security.
Can I lose the rules so the injection work?
My problem is only when localhost.
Production everything is in the same domain/port using nginx reverse proxy, so no problem there.
            Asked
            
        
        
            Active
            
        
            Viewed 50 times
        
    0
            
            
         
    
    
        Jonathan
        
- 4,724
- 7
- 45
- 65
- 
                    Does this answer your question? [How to apply CSS to iframe?](https://stackoverflow.com/questions/217776/how-to-apply-css-to-iframe) – doğukan Jul 04 '20 at 15:49
- 
                    @dgknca no because even thought the iframe is in localhost, it uses another port. So when I try to inject the css, chrome doesn't let it happen because of security. – Jonathan Jul 04 '20 at 15:58
- 
                    To access using js: You have to redirect the content from a server allowing CORS. Or alter the page server side directly. – NVRM Jul 04 '20 at 18:47