Forbidden 403 Access URL API in Laravel - laravel

Good afternoon, let me ask
I created a service API using Laravel, but one of the API urls when I sent the response parameter was 403 or Forbidden. even though before it was fine, it worked smoothly. And I raised it to the server instead it became Forbide. Anyone know why? thank you for answering

If it is ok on local and getting a forbidden error on the server, the problem might be caused by the webserver application. please take a look at this link.

Related

How to show laravel api error in digitalocean?

I deploy my Laravel + vue project on the Digitalocean apps and some of my api are working but some are not.
When I look into the api response I received message: "Server Error",
But the api is working on localhost and gives error after the deployment.
Is there a way to view the actual error message of the api reponse? so that I can easily understand what causing the error and fix it.
But I really find it weird that it causing error in the digitalocean apps, but works on my local machine.
I've tried searching for hours how to view the errors but I can't find it.
please help me. Thank you!
You can log in to your server and look in the file storage/logs/laravel.log.
Otherwise, I would suggest using a service such as Bugsnag or Sentry, which have integrations with laravel and will give you a dashboard with all your errors
Some people suggest putting APP_DEBUG to true, but that is a security risk as your customers will be able to see the error as well, and you should never do this on a production server

Content Security Violation in Shopify

I am using Shopify and I'm making an ajax get request to a different server. I have just implemented it so I'm testing it on the console. The request is getting through and I'm getting the response I want but I am also getting the following message:
[Report Only] Refused to connect to 'https://myurl.com/ApiClientes/ciudades' because it violates the >following Content Security Policy directive: "connect-src 'self' *.shopifycloud.com .shopifysvc.com >.amazon.com *.paypal.com *.facebook.com sessions.bugsnag.com analytics.tiktok.com bat.bing.com >www.google-analytics.com ct.pinterest.com stats.g.doubleclick.net".
I would like to get rid of it. Don't know what it is or what it means. I could really use some help. Thanks in advance :)
To handle this issue, don't make direct request to third-party server instead create one url at 'https://yourdomain.com/anypath/handlereqeust?r={requestURL}' to handle all the requests from Shopify store
Then make request to Shopify app as mentioned in this link: https://shopify.dev/apps/online-store/app-proxies

Endpoint Server GraphQL (overblog-GraphQLBundle) Not support Method POST

For 3 Days, my project which worked perfectly locally, once put on the production server.
GraphQl requests are a failure with the error "[Error: Network error: JSON Parse error: Unrecognized token '<']" and after log analysis it is a 404 error because the route was not found.
After investigation via the GraphQl Atlair client for chrome by changing the method to GET to make my GrasphQl requests, the error everything works.
my question is how to work the POST method?
I really need to use the METHOD POST for mutations
Thanks everyone
Very cordially
You forgot to add a trailing slash to your GraphQL endpoint URL.
Related issue (solved): https://github.com/overblog/GraphQLBundle/issues/669

Response for preflight has invalid HTTP status code 404

This is the responce i am getting when trying to upload a file from my client(PHP),My server is on WebApi which is hosted in one server.In my webapi i have allowed all CORS related things still i am getting this error.
Have you checked this tutorial?
Maybe when you say
In my webapi i have allowed all CORS related things
you didn't do that correctly, or maybe you enabled too many options at the same time.
It's hard to give you more details without access to your actual configuration.
There are also many posts on the same subject here on SO, have you checked them?

Request header field yammer-capabilities is not allowed by Access-Control-Allow-Headers.

Our API requests have started failing with the error "Request header field yammer-capabilities is not allowed by Access-Control-Allow-Headers".
Before the weekend, everything was working correctly.
Anyone else seeing this?
Same problem here, but it is not the first time, and I think we shouldn't change anything: Yammer's API is slowly beginning to be migrated to Office365's API, maybe this is why there is so much errors in this API... (hope so!)
If you want to see what they're working on :
https://about.yammer.com/success/engage/grow-your-network/release-schedule
Btw, did you try to post this issue on yammer Developer Network ? This can really help, they are using there own social network to communicate ;)

Resources