Categories
Mastering Development

React and Node application not uploading Images to Cloudinary, 404 error with no explanation

I am trying to upload an image to cloudinary. I am using this resource as my tutorial… I am able to render a preview of the image onto my screen and I console log the base64 encoded url, and it works as it is supposed to. After I select my Image, I hit upload and […]

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 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
Game Creation Mastering Development

How to flip a sprite that is noncentered

I have a sprite that I want to flip horizontal but I don’t want it to look like the sprite is "changing position". I have code that changes the sprite horizontal direction depending if you go right or left, the problem is that it looks like the character is changing position. I don’t understand how […]

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 […]

Categories
Mastering Development

Django + React Able to create new user in database, but token-auth returns 400 bad request

So I have an app that I’m writing. It’s working, for the most part, so far. I only currently have a login and signup setup, with a ‘homepage’ that just has a logout button and some text on it so I can test. When I do signup, it posts the user to the database, but […]

Categories
Mastering Development

configure nodejs rest api server and vue project with axios cors policy error

as the title sais, i’m trying to configure a local rest api server running node js and in the meantime i have a vue project with axios. i surfed the whole internet, tried every server/client configuration, server headers settings, cors package, axios header config, but i still have cors policy error inthe console. postman works […]

Categories
Mastering Development

Giving error with node/fastify Unsupported Media Type: application/x-www-form-urlencoded

index.js fastify.get("/paynow", (request, reply) => { let data = { TXN_AMOUNT: ’10’, // request amount ORDER_ID: ‘ORDER_123455’, // any unique order id CUST_ID: ‘CUST_1238w4’ // any unique customer id } // create Paytm Payment paytm.createPayment(config, data, function (err, data) { if (err) { // handle err } //store the url and checksum let url = […]

Categories
Ask Games Video Games

Service tracking digital-release games I can play across all my platforms/stores?

I play digitally released games via these stores/platforms: Steam, Epic Games, Xbox Game Pass, Origin, Uplay (Ubisoft Connect), on PC Nintendo eShop on Nintendo Switch and Wii U PlayStation Store and PlayStation Plus on PS4, PS3 and PSVita PlayStation Now on PC and PS4 When I want to play a game, it often happens that […]