![]() Discourse::Cors. ![]() Response to preflight request doesnt pass access control check - No Access-Control-Allow-Origin header. i have check the errors in the google dev console and see that im getting block on Cross-Origin Resource Policy. im running wordpress site with an instagram feed plugin. This is happening because of the CORS (Cross Origin Resource Sharing). How does the Access-Control-Allow-Origin header work 713. Hi all, im trying to get this fix to work for me. Dealing with Access-Control-Allow-Origin header. return [200, Discourse::Cors.apply_headers(cors_origins, env, No Access-Control-Allow-Origin header is present on the requested resourcewhen trying to get data from a REST API.cors_origins += rs_origins.split('|') if rs_origins.present?.However, we can’t always control the endpoint we are accessing. If you set this into the response header of the requested file, you will allow everyone to access the resources: > Not recommended allow all domains. There are two ways to solve the issue: The first, and easier, solution is to just allow all origins from your API endpoint. discourse/discourse/blob/862773ec83756a2deb6beaabbcb16756a98595f9/config/initializers/008-rack-cors.rb#L13-L49 CORS is only an issue when we are running or testing our app when running ionic serve or ionic run -l. I think this is the part of code that handles the cors settings, just in case it is useful. Is there a way to confirm that the env vars are set correctly? (or that the app restart configured the cors without resending requests, just trying to think of ways to debug).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |