How can you include http://foo.local in CORS Access-Control-Allow-Origin? - amazon-s3

I'm using *, but apparently that's not enough. I'm trying to upload a file from a client browser. It works when the client's URL is localhost:3000 or foo.com. It's not working when the URL is http://meteor.local. I've tried changing the third line to <AllowedOrigin>http://meteor.local</AllowedOrigin>, but get the same error.
The browser error:

The error text was misleading – error was not due to the header sent by s3. Adding an access rule to Cordova fixed it. (In meteor, add it with App.accessRule('http://meteor.local'); in mobile-config.js.)

Related

The API request failed with the following error: 200 - OK

I administer my shared hosting through cPanel.
It is showing "The API request failed with the following error: 200 - OK." in red popup.
Everything is working fine. I can work on everything as usual, but still this pop?
When i login from another browser, the error is not shown.
How to get rid of it and why is this being shown?
How to get rid of this message was my question.
I had installed a chrom plugin that allowed me to use CORS.
After uninstalling this plugin, the error was gone.

CORS issues with vue/node to rack/thin via nginx

I had this working properly and all of a sudden during a restart stopped working and I can't get to the bottom of what happened.
Basically, vue/node (dev) mode is using http but the ajax uses https to the server.
Server responds with all headers including Access-Control-Request-Origin and I can see json data response from the server in the firefox dev tools
But for some reason it throws an Error: Network Error alert. Inspecting in dev tools I find
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://r.roller.lan/workstations?session_token=2de63puojmt3ubkfp94c3ohm45. (Reason: CORS header “Access-Control-Allow-Origin” does not match “https://devv.roller.lan:8080”)
I am making request from http://devv.roller.lan:8080 and somewhere in the chain gets translated to https:// which doesn't match?
Thanks
Everything works as expected after I added highlighted portion from the Nginx Reverse Proxy article Koshux referenced to the nginx conf.

How to debug a 404 error on apache server ( lamp )?

I came across 404 error a few times and i have difficulties in debugging this kind of problem.
What is the strategy and tools available to analyse such problems (firebug, logs...).
How to differentiate and fix the cause ?
page not existing ,wrong path , redirection and rewriting ,server problem ...
404 error code means that a file is not found for whatever reason.
Just check that the file exists and that the path you use is right.
You can analyse sent requests and received responses headers and body in your browser's developper console if you want more details about why some request failed.

Sporadic invalid_request 400 errors connecting to Shopify /admin/oauth/access_token

I am using a java raw HTTP client to connect to Shopify API (specifically, using Play Framework with the non-defualt sync driver which is actually the JDK's default driver).
My application usually manages to connect successfully and convert the temporary access token into a permanent one by calling the /admin/oauth/access_token endpoint.
However, sometimes I get this error result from the API:
Generic Error(400)
{"error":"invalid_request"}
I haven't been able to reproduce the issue with my test stores - I've tried installing a fresh store, reinstalling existing stores after uninstalling, I'm not sure why this call sometimes fail and how to debug it. The API call still continues to succeed for some stores using our application.
Some things that I am doing:
Even if the URL of the store is on a custom domain, I'm always using the https://foo.myshopfiy.com/admin/oauth/access_token URL and not the URL of the custom domain, to prevent a redirect.
I am always using an https URL and never an http one, again to prevent a redirect (we noticed a few issues with redirect with the Java HTTP client, so we aim to have zero redirects)
A thread I found about this error suggest possible problems with our SSL certificates, however I don't think this is my problem because some requests work for us, and the result of running openssl on our machine does't show any issues.
How should I proceed? Open a support ticket with Shopify?
FYI, I see that this specific problem only started yesterday on Feb 19 2013, so it might be a temporary issue.
FYI, the problem was caused by reusing a temporary access code.
Our fault - Shopify could have been more clear in their error message though.

$_POST undefined from remote server POST

I am writing a Drupal 7 module which is listening for HTTP POST messages to be sent by a 3rd party remote application. For testing I am sending messages using the Firefox Poster extension.
If I POST the message, the following code fails to place any value in my local vars (I get 'undefined index'):
$transId = urldecode($_POST['c2s_transaction_id']);
However, if I send the message using GET, the vars get populated fine with the following code:
$transId = urldecode($_REQUEST['c2s_transaction_id']);
This is true on both my local WAMP setup and on a shared hosting package.
I have never worked with HTTP POST messages before and have no idea where the problem might be. Could it be Drupal, the web server, or my code? Can anyone suggest how I might resolve this?
Many thanks,
Polly
Drupal removes the $_POST/$_GET in the system, just use $_REQUEST instead.