diff options
author | Michael Brown <mcb30@ipxe.org> | 2017-01-23 14:41:22 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2017-01-23 14:43:20 +0000 |
commit | de85336abb7861e4ea4df2e296eb33d179c7c9bd (patch) | |
tree | d155d26521ee1a4ae45e3baeaa099756ffcf43bc /src/config/config_http.c | |
parent | 0dc4814ca83b8b7ca226c4a9c4bdcc050af2882b (diff) | |
download | ipxe-de85336abb7861e4ea4df2e296eb33d179c7c9bd.tar.gz |
[cloud] Add ability to retrieve Google Compute Engine metadata
For some unspecified "security" reason, the Google Compute Engine
metadata server will refuse any requests that do not include the
non-standard HTTP header "Metadata-Flavor: Google".
Attempt to autodetect such requests (by comparing the hostname against
"metadata.google.internal"), and add the "Metadata-Flavor: Google"
header if applicable.
Enable this feature in the CONFIG=cloud build, and include a sample
embedded script allowing iPXE to boot from a script configured as
metadata via e.g.
# Create shared boot image
make bin/ipxe.usb CONFIG=cloud EMBED=config/cloud/gce.ipxe
# Configure per-instance boot script
gcloud compute instances add-metadata <instance> \
--metadata-from-file ipxeboot=boot.ipxe
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config/config_http.c')
-rw-r--r-- | src/config/config_http.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config/config_http.c b/src/config/config_http.c index 3f198d228..3c0e78028 100644 --- a/src/config/config_http.c +++ b/src/config/config_http.c @@ -43,3 +43,6 @@ REQUIRE_OBJECT ( httpdigest ); #ifdef HTTP_ENC_PEERDIST REQUIRE_OBJECT ( peerdist ); #endif +#ifdef HTTP_HACK_GCE +REQUIRE_OBJECT ( httpgce ); +#endif |