Skip to content

Commit 4e7c8c6

Browse files
authored
CORS configuration instructions
See #159
1 parent d255d5b commit 4e7c8c6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

INSTALLATION.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,21 @@ openssl pkcs12 -inkey ./cert/local_dev.key -in ./cert/local_dev.crt -export -out
127127
openssl base64 -in ./cert/local_dev.pfx -out ./cert/base64_pfx
128128
```
129129

130-
#Build Local Environment
130+
# CORS Configuration
131+
132+
As document storage is delegated to S3-compatible services that reside in a different host than the OpenSign one, document operations (loading, storing, deleting) are subject to [Cross-Origin Resource Sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) restriction policies; as a consequence, OpenSign app may fail with (browser console) errors like the following:
133+
```
134+
Access to fetch at 'https://foo.nyc3.digitaloceanspaces.com/exported_file_4627_0000-00-00T00%3A45%3A43.344Z.pdf'
135+
from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header
136+
is present on the requested resource. If an opaque response serves your needs, set the request's mode to
137+
'no-cors' to fetch the resource with CORS disabled.
138+
```
139+
140+
In order to address this, your document storage system must be instructed to accept requests from other hosts; below the relevant documentation links:
141+
- [How to Configure CORS on DigitalOcean Spaces](https://docs.digitalocean.com/products/spaces/how-to/configure-cors/)
142+
- [Configuring cross-origin resource sharing on AWS S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enabling-cors-examples.html)
143+
144+
# Build Local Environment
131145

132146
Below are the steps to follow -
133147
- Execute `make build`

0 commit comments

Comments
 (0)