Replies: 8 comments 4 replies
-
|
Please try to insert the |
Beta Was this translation helpful? Give feedback.
-
|
No luck: |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
@GimluCom any clues? |
Beta Was this translation helpful? Give feedback.
-
|
@fenix2222 Hi Bro, You can Change file default.conf.template in |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
That's strange, I set it up the same way, and I'm also unable to view the data when using localhost. The error message is also 502. |
Beta Was this translation helpful? Give feedback.
-
|
add_header 'Access-Control-Allow-Origin' 'http://localhost' always; edit add_header 'Access-Control-Allow-Origin' '*' always; |
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
-
We are trying to run blockscount on Linux machine using docker-compose. Everything works fine when we access it locally on Linux box using "http://localhost". However, if I access it outside that machine using IP address or DNS name, we get CORS errors for all API calls, because Origin domain doesn't match localhost.
I tried changing:
add_header 'Access-Control-Allow-Origin' 'http://localhost' always;to
add_header 'Access-Control-Allow-Origin' '*' always;in docker-compose/proxy/default.conf.template, but that doesn't seem to do anything.
The only way I can get it work is to update common-forntend and replace all mentions of "localhost" to the IP of the Linux machine. But that seems dodgy. How can I set CORS policy properly, ideally without needing to use * and specifying domains.
Beta Was this translation helpful? Give feedback.
All reactions