发起问题

rapoport 的档案 - activity

2019-07-30 05:41:00 -0500 获得奖牌  著名问题 (source)
2019-07-30 05:41:00 -0500 获得奖牌  热门的问题 (source)
2018-04-02 05:55:35 -0500 获得奖牌  编辑 (source)
2018-04-02 05:54:27 -0500 问了问题 Accessing Object Storage from multiple domains, caching and CORS

The way how Object Storage manages CORS headers doesn't play well with the caching strategies of common browsers.

I have a file in the Object Storage. On the container I set following headers:

X-Container-Meta-Access-Control-Allow-Origin: https://example.org https://sample.com

X-Container-Meta-Access-Control-Expose-Headers: Access-Control-Allow-Origin

X-Container-Read: .r:*

Let's say my file is accessible from https://openstack.hosting.com/v1/AAA/mycont1/data.xml

I have two websites that access that file using a GET method. Whenever the file is requested OpenStack checks the Origin header and replies with the CORS header having one domain (from the Origin and only if it is allowed), for example:

Access-Control-Allow-Origin: http://example.org

The problem is that such a GET response is cached by common browsers. It means if I open the first site https://example.org then the response will be cached with the CORS-Header being https://example.org. Next, if I open the second website http://sample.com then the browser will take the response from the cache, compare CORS header (it will not match) and block the website from accessing the resource.

Can I disable the logic that dynamically calculates the Access-Control-Allow-Origin on each request and make it always send all allowed domains?

As a solution I can artificially make requests from different websites be different in order to make them cache separately (e.g. /data.xml?example.org and /data.xml?sample.com). But I don't want the file to be cached twice.

I am using an OpenStack hosting, it has Object Storage version 2.15.1.dev61

Thanks!

2017-12-25 21:42:37 -0500 获得奖牌  著名问题 (source)
2017-12-22 17:14:50 -0500 获得奖牌  学者 (source)
2017-12-22 17:14:37 -0500 获得奖牌  热门的问题 (source)
2017-12-22 13:07:18 -0500 获得奖牌  受欢迎的问题 (source)
2017-12-21 05:09:39 -0500 问了问题 How to get info about deleted instance?

Hi,

is it possible to get information about a deleted instance? Especially if they were not able to launch. I want to get the fault part of the server data.

A simple call GET servers/[ID] returns 404 error after an instance was deleted.

2017-10-20 08:25:31 -0500 获得奖牌  粉丝
2017-10-19 10:39:16 -0500 获得奖牌  受欢迎的问题 (source)
2017-10-17 11:22:56 -0500 问了问题 Why is the snapshot size larger than used space in the partition??

Hi,

I created a snapshot from a Ubuntu instance while it was powered down. The used space on the disk was 2.7G, but the image is 4.5G large. The total disk capacity is 10G, RAM is 2G. I only have Horizon access (and API access too) to the OpenStack. Why the image has this size? What besides the main partition was included into the image?

Here is the df -H output before snapshot creation:

Filesystem      Size  Used Avail Use% Mounted on
udev            1.1G     0  1.1G   0% /dev
tmpfs           205M  3.2M  202M   2% /run
/dev/sda1        11G  2.7G  7.7G  26% /
tmpfs           1.1G  234k  1.1G   1% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs           1.1G     0  1.1G   0% /sys/fs/cgroup
tmpfs           205M     0  205M   0% /run/user/0

Image info:

  • Size: 4.51 GB
  • Min. Disk: 10 Min.
  • RAM: 0
  • Disk Format: QCOW2
  • Container Format: BARE

Thanks!

2017-10-17 06:17:52 -0500 获得奖牌  受欢迎的问题 (source)
2017-10-12 05:35:15 -0500 获得奖牌  拥护者 (source)
2017-10-11 08:55:05 -0500 问了问题 Max number of entries in Object Storage?

Hi!

Is there any limit on number of entries inside of an object storage container? Will 1kk entries work? 10kk?

Reading them should be possible using filters on container GET operation.

Or, perhaps, is this a bad approach and multiple containers should be used instead?

Thanks!