通过http提供GAE应用程序

时间:2015-06-23 10:05:17

标签: java google-app-engine ssl

我在GAE上实现了一个可以通过https://<my_app_id>.appspot.com访问的应用程序。现在我有一个在Register.com注册的自定义域名。如GAE文档中所述,我已将自定义域映射到https://<my_app_id>.appspot.com,并且我看到我的应用程序从我的自定义域提供。但我发现请求失败,错误为"SSL required to perform this operation"。但我没有任何SSL证书。我可以在没有SSL的情况下提供我的申请吗?我的意思是只使用http

更新: 对执行网址curl -v example.org/_ah/api/myapi/v1/package/ -o /dev/null

的回应
* Adding handle: conn: 0x1fa7e80
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x1fa7e80) send_pipe: 1, recv_pipe: 0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* About to connect() to mydomain.com port 80 (#0)
*   Trying ipaddress...
* Connected to mydomain.com (ipaddress) port 80 (#0)
> GET /_ah/api/myapp/v1/package/ HTTP/1.1
> User-Agent: curl/7.30.0
> Host: mydomain.com
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
< Date: Tue, 23 Jun 2015 12:26:50 GMT
< Vary: X-Origin
< Content-Type: text/html; charset=UTF-8
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
* Server GSE is not blacklisted
< Server: GSE
< Alternate-Protocol: 80:quic,p=0
< Accept-Ranges: none
< Vary: Origin,Accept-Encoding
< Transfer-Encoding: chunked
<
{ [data not shown]
Warning: Failed to create the file /dev/null: No such file or directory
* Failed writing body (0 != 9)
* Failed writing data
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
* Closing connection 0
curl: (23) Failed writing body (0 != 9) 

1 个答案:

答案 0 :(得分:1)

你从文档中遗漏了两件事:

  

Google Cloud Endpoints需要SSL。如果您需要在不支持SSL的系统中访问后端API,则需要更新系统以支持SSL或使用代理。

  

Google Cloud Endpoints不支持自定义域。

请参阅https://cloud.google.com/appengine/docs/java/endpoints/