Comments (6)
works for me.
Example:
Request:
curl "http://127.0.0.1:8092/_matrix/client/r0/keys/upload" ^ -H "Accept: */*" ^ -H "Accept-Language: en-US,en;q=0.9" ^ -H "Cache-Control: no-cache" ^ -H "Connection: keep-alive" ^ -H "Content-Type: text/plain;charset=UTF-8" ^ -H "Origin: chrome-extension://mddoackclclnbkmofficmmepfnadolfa" ^ -H "Pragma: no-cache" ^ -H "Sec-Fetch-Dest: empty" ^ -H "Sec-Fetch-Mode: cors" ^ -H "Sec-Fetch-Site: none" ^ -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" ^ --data-raw ^"^{^ ... ^}^" ^ --compressed
Response:
HTTP/1.1 200 OK Content-Type: application/json Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization, Cookie Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS Access-Control-Allow-Origin: * Date: Wed, 21 Jun 2023 20:23:34 GMT content-length: 43
Maybe your server is not returning:
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization, Cookie Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
So I do not think that this is a yaade issue, but an issue with your server application.
FYI: To debug the network communication between yaade and your application, assuming you are using the yaade extension in chrome as proxy:
Open chrome devtools (F12)
Application > Service Workers > See all registrations
Click inspect button.
This opens a new devtools window (for the extension)
The requests to your server are found in the network tab.
-- Ron
from yaade.
works for me. Example: Request:
curl "http://127.0.0.1:8092/_matrix/client/r0/keys/upload" ^ -H "Accept: */*" ^ -H "Accept-Language: en-US,en;q=0.9" ^ -H "Cache-Control: no-cache" ^ -H "Connection: keep-alive" ^ -H "Content-Type: text/plain;charset=UTF-8" ^ -H "Origin: chrome-extension://mddoackclclnbkmofficmmepfnadolfa" ^ -H "Pragma: no-cache" ^ -H "Sec-Fetch-Dest: empty" ^ -H "Sec-Fetch-Mode: cors" ^ -H "Sec-Fetch-Site: none" ^ -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" ^ --data-raw ^"^{^ ... ^}^" ^ --compressed
Response:
HTTP/1.1 200 OK Content-Type: application/json Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization, Cookie Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS Access-Control-Allow-Origin: * Date: Wed, 21 Jun 2023 20:23:34 GMT content-length: 43
Maybe your server is not returning:
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization, Cookie Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
So I do not think that this is a yaade issue, but an issue with your server application.FYI: To debug the network communication between yaade and your application, assuming you are using the yaade extension in chrome as proxy:
Open chrome devtools (F12) Application > Service Workers > See all registrations Click inspect button. This opens a new devtools window (for the extension)
The requests to your server are found in the network tab.
-- Ron
However it works when I allow from all origin using "*". The problem is when I allow only the host name of the yaade server where it is running. On the server cors is enabled for all origin. Attached the screenshots here.
from yaade.
hello,
check the request sent by yaade. it sets
Origin: chrome-extension://mddoackclclnbkmofficmmepfnadolfa
this is not the server where yaade is running., but the extension in the browser.
note that localhost on the yaade server would be the yaade server, not the pc where your browser is running.
so, try whitelisting chrome-extension://mddoackclclnbkmofficmmepfnadolfa in your application.
-- Ron
from yaade.
PS:
you may also try allowing private network access.
https://www.innoq.com/en/blog/cors-private-network-access/
https://stackoverflow.com/questions/76036487/spring-cors-filter-for-access-control-allow-private-network-not-working
from yaade.
PS:
some browsers/servers differenciate between localhost and 127.0.0.1.
so maybe try the latter.
from yaade.
Close due to inactivity.
from yaade.
Related Issues (20)
- Feature request: make collections search bar sticky
- Bug report: Crash when switching collections HOT 1
- Bug report: collection level headers take precedence
- What is the default password? HOT 1
- BUG report:Error when compiling jar package HOT 4
- Feature Request: Restrict access per environment
- save button not working HOT 3
- Align save collection call with overall project architecture HOT 1
- Bug: Wrong background color on input fields in light mode
- OCID not working with TLS1.3 HOT 8
- Bug: Formatting is removed from JSON response bodies HOT 1
- Bug: Collection name disappears HOT 1
- Bug: Server proxy corrupts JSON HOT 2
- Bug: Large request bodies disappear while scrolling
- Feature Request: Share environments between collections or have nested collections HOT 1
- Bug: Setting body application/json always sends text/plain HOT 1
- Option for disable SSL check HOT 8
- Feature Request: Structured data support (multipart/form-data) HOT 2
- Get an error when importing postman export JSON file HOT 1
- Any plans to make it work on arm64? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yaade.