I am starting to learn react.js and was anycodings_webserver doing a simple Hello program.
<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title></title> </head> <body> <div id="hello_container" class=""></div> <script src="//unpkg.com/react@16/umd/react.development.js" ></script> <script src="//unpkg.com/react-dom@16/umd/react-dom.development.js" ></script> <script> class Hello extends React.Component { constructor(props) { super(props); } render() { return React.createElement( 'div', null, `Hello ${this.props.name}!` ); } } ReactDOM.render(React.createElement(Hello, {name: 'React'}, null), document.querySelector('#hello_container')); </script> </body> </html>But i was running into an issue for these anycodings_webserver two script tags ,
<script src="//unpkg.com/react@16/umd/react.development.js" ></script> <script src="//unpkg.com/react-dom@16/umd/react-dom.development.js" ></script>Failed to load resource: the server anycodings_webserver responded with a status of 403 anycodings_webserver (Forbidden) Uncaught ReferenceError: React anycodings_webserver is not defined
I found something on google as to run the anycodings_webserver html code on a web server(//) rather anycodings_webserver than from file system (file:///) So i ran a anycodings_webserver local web server as python3 -m http.server anycodings_webserver 1234 and it worked . I got output as Hello anycodings_webserver React!.
But i want to know why i was getting anycodings_webserver forbidden error when running the code from anycodings_webserver file system ?
Is it related to same origin allow access anycodings_webserver ? What is different in running html code anycodings_webserver from file system and on a web server?
Fala pessoal! Tudo jóia?!
Estou com o seguinte problema, será que alguém saberia me apontar para uma possível solução:
Está tudo funcionando perfeitamente na aplicação e as imagens das pizzas carregam perfeitamente; porém, o Admin do Django está feio, e quando inspecionado o console ele aparece vários arquivos estáticos com esse erro 403 dizendo que o carregamento foi proibido.
GET //igs-alura-pizza-imagens.s3.amazonaws.com/admin/css/fonts.css net::ERR_ABORTED 403 (Forbidden) base.css:1GET //igs-alura-pizza-imagens.s3.amazonaws.com/admin/img/tooltag-add.svg 403 (Forbidden) base.css:1
Isso seria porque o Django está tentando buscar os estáticos no banco mas o django admin em si não tem essa permissão??? Tem algo a ver com CORS? Como poderia resolver? Em um outro projeto, consegui resolver isso deixando o S3 como Public, mas isso não é viável em um ambiente seguro de produção.
Desde já, agradeço! Abraços!!
Skip to content
Support » Fixing WordPress » Failed to load resource: the server responded with a status of 403 ()
Hi
I have many problems with my site. The first of them is the missing of images and in some pages the misconfiguration of icons.
I have uploaded the images but they are lost again.
In the Chrome console I have seen a recurring error:“Failed to load resource: the server responded with a status of 403 ()”
with the route “wp-admin/admin-ajax.php:1”
I read the 403 error is a permissions problem, but this document have 644 like all others. All folders have 755 also.
I disabled all plugins but the problem remains.
Earlier, a week ago I realized that the SSL certificate was expired, so I thought that the problem was due to that, but now that it has been fixed, the problem persists.
I installed Health Check & Troubleshooting plugin but it’s show all good. In error_logs there are no errors. I have a Divi theme and in the theme’s functions they say that everything is working optimally.
But the images are lost.
And the icons display wrong, like numbers.
I have seen the latter related to Chrome, but disabling the cache has not worked either.
Any other idea?
Thank you very much!`- This topic was modified 10 months, 2 weeks ago by gcordero.
The page I need help with: [log in to see the link]
- The topic ‘Failed to load resource: the server responded with a status of 403 ()’ is closed to new replies.