Skip to content

CORS error when using extension outside of the official hopscotch instance #184

Open
@mklilley

Description

@mklilley

Hi there.

I'm a bit confused about how the browser extension is supposed to work.

I installed the extension in brave and was then able to send requests to previously CORS blocked sites from https://hoppscotch.io/. I was able to do this by switching on the interceptor in the settings - everything was super clear and easy.

I wasn't however sure what the Add new origin thing in the extension was supposed to do. In the README of this repo is says:

If you want to use the extension anywhere outside the official Hoppscotch instance you may want to add the domain to the extension's origin list. You can access the origin list by clicking on the extension icon on your browser toolbar.

I took this to mean that if I add e.g. http://localhost:3000 then if I'm on http://localhost:3000 and I make a request to e.g. https://www.fruityvice.com/ then I won't have any CORS issues because hopscotch extension will make the request to https://www.fruityvice.com/ for me and add all the necessary CORS stuff. I was not able to make it work though. I still got CORS issues doing this. I also wondered whether instead I should add https://www.fruityvice.com/ as a new origin. I tried it and this also didn't work - I still got CORS errors when requesting https://www.fruityvice.com/ from http://localhost:3000

Perhaps I'm misunderstanding how to use the extension anywhere outside the official Hoppscotch instance.

Could someone offer some guidance please.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions