Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins don't work after setup, 405 Not Allowed #133

Open
kylezs opened this issue Jun 14, 2021 · 1 comment
Open

Plugins don't work after setup, 405 Not Allowed #133

kylezs opened this issue Jun 14, 2021 · 1 comment
Assignees

Comments

@kylezs
Copy link
Contributor

kylezs commented Jun 14, 2021

Once I get subscan working with my local chain for the basic queries e.g. "block: 2" on the subscan homepage, plugins don't work.

If I click Plugins -> { any option } they all fail, here are the request headers:

POST /api/scan/blocks HTTP/1.1
Host: 127.0.0.1:3000
Connection: keep-alive
Content-Length: 32
sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"
Accept: application/json, text/plain, */*
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
Content-Type: application/json
Origin: http://127.0.0.1:3000
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://127.0.0.1:3000/blocks
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8

I get a 405 Not Allowed Response

But the request for /plugins succeeds with headers:

POST /api/scan/plugins HTTP/1.1
Host: 127.0.0.1:4399
Connection: keep-alive
Content-Length: 0
sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"
Accept: application/json, text/plain, */*
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
Origin: http://127.0.0.1:3000
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://127.0.0.1:3000/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8

I'm assuming it's something to do wth the Host and the nuxt.config.js proxy stuff but I'm not sure how it's supposed to be configured, given I'm using what's in the repo, I'd assume it is supposed to work?

I'm running using Docker if that impacts anything.

@kylezs kylezs changed the title Plugins don't work after setup, 405 Plugins don't work after setup, 405 Not Allowed Jun 14, 2021
@freehere107
Copy link
Collaborator

@carlhong Can you help me take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants