angular 4 web service 405 status response - web-services

i'm trying to use a webservice from angular 4 project , but i have this issue in the console of chrome browser :
for more details get method work correctly .
the adresse : 192.168.1.110:8000 is adress of my backend projet
the adresse : 192.168.1.110:4200 is adress of my frontend projet (angular)
what's wrong please ?

Because of the way browser works your request is blocked. You need to google how to enable CORS on your development platform here. Or you can search SO for what is and how to enable CORS.

Related

chrome makes null endpoint request in django service

My env is django backend , vuejs from vite frontned.
also using django-vite package in backend and nginx for proxy server.
But when I depolyed all code to server, now I am getting null endpoint request.
I can only see it in chrome browser. It doesn't appear in IE edge.
Why does it happend? Do you guys have any idea?
I left screenshot and service url http://3.35.61.148/
Can it be related to not using SSL(https) ?

REST API not working and redirecting with https/ssl

I have build and application with angular 5 and REST API with golang and hosted them on aws ec2 instance, I have installed ssl certificate to run the app and api on https. following is my url structure to run app and api ( api is running on 8080 port
app : https://mysite.maindomain.com
api : https://mysite.maindomain.com:8080
When I hit api after setting up the ip in host file on system it works fine but its not working with aws and redirects to https://mysite.maindomain.com:8080 when I hit any api like https://mysite.maindomain.com:8080/signup or https://mysite.maindomain.com:8080/get-user/10
Nor sure what is the issue here but everything else is working fine
I am using gin gonic as go framework and also have used RunTLS as recommended.
Not sure I fully appreciate the issue, but just in case, have you setup CORS on the API server (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).
If you run a browser application served from ORIGIN1, and the browser tries to access an API on DESTINATION2, the API server must state to the browser that it is indeed authorized to reply to a browser originating from ORIGIN1.
You can for example use https://github.com/gin-contrib/cors to add CORS support to your API server.
Good luck.

CORS HTTPS-to-HTTP webservice in Chrome Extension

I am writing a 'Content Script' based extension for Chrome that works on GMail (HTTPS). It needs to access a web service on our website, which is currently on HTTP only. Other than getting an SSL, is there any alternative to get an AJAX GET/POST call working between these two?
I think you can : https://developer.chrome.com/extensions/xhr
But be aware that without https someone can see and change everything your extension send or receive with your website.
You should implement https as soon as possible to avoid any security issue.

IRS : Getting Error When Manually Setting Endpoint Address. "The WS Security Header in the message is invalid"

IRS ACA has two web services, 1) to submit aca forms and 2) to check the status of submitted forms. The problem I face is on 2) one, i.e web service where we check status.
I use Java 1.8 and Apache CXF 3.1.5 as a client to these services.
The problem is when I set the endpoint address on the cxf client proxy manually, I get the security error and if I don't set, it uses the address from WSDL and that works fine.
Has anyone faced this problem ?

Issue in getting custom header in Safari

I have a webservice which is hosted on api server and application on app server which have url's like https://webservice.test.com/ for webservice server and https://app.test.com/ for application.
In application we get live data from database using several service we developed on webservice server using CORS http request.
In some service like login we have passed custom header x-auth-token from server.
Above is the screen shot of response we have got in Google Chrome for the request. The Custom header shown in last is available in application when we use it in chrome or Mozilla. The same response we got in Safari too, x-auth-token also available in response when we check in headers but can't able to read it through code.
Finally, after a lot of search i got answer for my problem, Custom headers from CORS http request can be read only in Safari for latest webkit version i.e above 537. I have checked in all safari browser which is above this webkit version will provide me cusom header value. And similarly in chrome if webkit is less than 537 version you can't able to read it.
Maybe this answer on github could helpa bit : https://github.com/angular/angular.js/issues/6254