Categories
Mastering Development

“PUT” method blocked by cors policy no ‘access-control-allow-origin’ header is present on the requested resource

I am using an Angular (10) application to access a Java (1.7) application via REST api. Everything works as expected. There are a number of GET and POST method calls that work fine. Problem I added a PUT method. Now when the Angular application calls the PUT method, it gets the following error: method blocked […]

Categories
Mastering Development System & Network

Ejabberd TLS negotiation failed

Morning everyone. Sorry if this post doesn’t follow standard posting conventions or if I’m missing something, this is my first time posting here and also I’m a pretty stupid person. I’ve been trying for two days to get a simple Ejabberd setup working on a FreeBSD system, nothing too complicated, but couldn’t get past a […]

Categories
Mastering Development

Why is Cors getting an error in React-admin? [duplicate]

I connected the admin panel in the client import React from "react" import { Admin, Resource } from "react-admin" import restProvider from ‘ra-data-simple-rest’ import PostList from "./PostList"; const AdminPage = () => { return ( <Admin dataProvider={restProvider(‘http://192.168.88.83:3001′)} > <Resource name=’blogs’ list={PostList} /> </Admin> ); } export default AdminPage but the console shows an error admin#/blogs:1 […]

Categories
Mastering Development System & Network

Generate keys for nginx, with only a public key

I have an Elasticsearch endpoint as a service (I have no access to config/server). The service provided me with a username and password, and a single "TLS certificate" file, which when decoded says that it is RSA Public-Key: (2048 bit) I am running nginx and want to use it as a reverse proxy for this […]

Categories
Mastering Development

‘from’ parameter not supported c++ libcurl mailgun api

I’m trying to send a email with the mailgun api using c++ libcurl. The api is returning the error "message": "’from’ parameter is not a valid address. please check documentation". code CURL* curl; CURLcode res; std::string readBuffer; std::string user = "api:" + (std::string)"MY_API_KEY"; std::string data = "from=’from=’\"Bob Marley\" <bob@host.com>’&to=’jlkrumholz01@gmail.com’&subject=’Hello’&test=’hi’"; curl = curl_easy_init(); if (curl) { […]

Categories
Mastering Development

No Access-Control-Allow-Origin after many calls edit > Axios network error catch

I’ve googled this issue very often and I think I’ve inserted them all which I know is redundant but I’m desperate. In my server I’ve added: app.use(cors()) and app.use(function (req, res, next) { res.setHeader(‘Access-Control-Allow-Origin’, ‘*’); res.setHeader(‘Access-Control-Allow-Headers’, ‘Origin, X-Requested-With, Content-Type, Accept’); res.setHeader(‘Access-Control-Allow-Methods’, ‘POST, GET, PATCH, DELETE, OPTIONS’); next(); }); and in the route, I’ve added: router.use([‘/api/’, […]

Categories
Mastering Development

ERR_NAME_NOT_RESOLVED when making ajax call to sap RFM in Cordova app on Android using SAPUI5

This is my first question and I’m quite new to sap development, so I hope I can make this clear enough. I’m trying to make a call to RFC from an Android app. I created the function module on my company’s SAP system and then exposed it as SOAP web service. Then I wrote a […]

Categories
Mastering Development System & Network

ERR_CERT_COMMON_NAME_INVALID on chrome

When trying to login to my website on Chrome based browsers I get the error: Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID On firefox it works fine, tho. I installed certificates by certbot. My corresponding nginx settings look like: server { listen 80; server_name pvapp.umwelt-campus.de; return 302 https://$server_name$request_uri; } server{ # SSL configuration listen 443 ssl default_server; […]

Categories
Mastering Development

net::ERR_CONNECTION_REFUSED – Problem with CORS, Heroku App and NodeJS

i’m facing a ERR_CONNECTION_REFUSED on client-side, hosted on heroku app and my node back-end server, running in my PC. i have configured CORS on server.js this way: var express = require(‘express’) var cors = require(‘cors’) var port = process.env.PORT || 5000 var app = express() app.use(cors()); app.use(express.json()) app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*") res.header(‘Access-Control-Allow-Methods’, ‘GET,PUT,POST,DELETE’); […]

Categories
Mastering Development

PHP cors error with headers from Angular call

my endpoint has this: <?php header(‘Access-Control-Allow-Origin: *’); header("Access-Control-Allow-Credentials: true"); header(‘Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS’); header(‘Access-Control-Max-Age: 1000’); header(‘Access-Control-Allow-Headers: Accept,Origin, Content-Type, X-Auth-Token , Authorization’); … But with my Angular Call from Localhost, I get this error: Access to XMLHttpRequest at ‘https://example.com/createuser.php?api_key=123’ from origin ‘http://localhost:8100’ has been blocked by CORS policy: Response to preflight request doesn’t pass […]