curl – firebase functions – processing head queries

I have some Firebase cloud features configured like this:

const app = express ();

app.get (& # 39 ;, (req, res) => res.send (& # 39; 404 & # 39;));
app.head (& # 39; /: userId /: slug & # 39 ;, trackFile);
app.get (& # 39; /: userId /: slug & # 39 ;, trackFile);

app.use (& ap; & ap;, app);
export const api = functions.https.onRequest (app);

As you can see, I've defined a route for HEAD requests but in the trackFile function, I write the query method (method required) to Firestore, and he always comes back as "GET".

I test it with a loop to make the request of head: curl -I https://myfirebaseapp.com/etc/etc/

Are there functions with fire base where it always transmits HEAD requests to GET routes? I need to know when a request is a HEAD application to track it properly.

angularjs – How to use the Curl with POST method in Angular?

I have some kind of http.post it must be via Curl, type this example:

curl -X POST -F & # 39; files = @ / path / to / pictures / avatar.jpg & refId = 5a993616b8e66660e8baf45c & ref = user & source = users-permissions & field = avatar & # 39; http: // localhost: 1337 / upload

As you can see, sending image to a specific field. This loop is represented by this JSON:

{
"files": "...", // Buffer or file stream (s)
"path": "user / avatar", // download the file (s).
"refId": "5a993616b8e66660e8baf45c", // username of the user.
"ref": "user", // model name.
"source": "user-permissions", // name of the plugin.
"field": "avatar" // Name of the field in the user template.
}

Well, do it this way:

Create an entry in the HTML code of my component:


Create your event:

onFileSelected (event) {
console.log (event);
}

I have several results among them the file with:

files: list of files
0: file (58456)
lastModified: 1542844204930
lastModifiedDate: Wed 21 Nov 2018 21:50: 04 GMT-0200 (Brasilia summer time) {}
name: "8.jpg"
size: 58456
type: "image / jpeg"
webkitRelativePath: ""

This already gives me the name of the picture and its format. What is 0 files=@/path/to/pictures/avatar.jpg of Curl. Okay

Make:

this.selectedFile = event.target.files[0]; // give me the name of the image and its extension

I also have the redId which is my id, I have the user name, I already have the permission and the name of the field.

How can I use the curl, shown at the beginning, with the post-Angled method, since I already have all the data I need?

Oh, I get this information from this Strapi.io documentation: https://strapi.io/documentation/3.x.x/guides/upload.html#examples

Thank you

Curl – negotiate: Force Kerberos? – Server fault

We are testing SPNEGO support for an Apigee API proxy. I'm using the sample API found here as a basis for my proxy. Everything is configured and it is now time to test. I'm running:

curl -vki --negotiate -u: https: ///

In doing so, however, I note that my Authorization header sends an NTLM negotiation rather than a Kerberos negotiation. This is problematic because the proxy code is configured to use GSSAPI to support Kerberos.

Does anyone know a way to Obligate can you use Kerberos instead of NTLM as negotiation? I have not found a way to do it yet, but I thought I would ask for it here.