markdown-viewer icon indicating copy to clipboard operation
markdown-viewer copied to clipboard

Cannot wildcard port

Open erik777 opened this issue 4 years ago • 3 comments

I am launching Chrome from Eclipse using a preview feature. It gives a random port every time. I've tried to wildcard the port, but nothing seems to work.

I've tried:

http://127.0.0.1:* http://127.0.0.1:/

If I add

127.0.0.1://*

It changes it to

http://*

Which first appeared to work, then didn't.

In the end, Allow All is the only option that consistently works.

erik777 avatar Oct 06 '19 15:10 erik777

I don't think port is supported pattern for Chrome extensions.

Although I just tried allowing just the:

  • http://localhost
  • http://127.0.0.1

and it works with any port. Specifying the port is optional.

simov avatar Oct 07 '19 06:10 simov

Having those two didn't work for me. What I discovered works is a combination of both:

http://localhost *://localhost

Doesn't make sense you need both since you would think http is a subset of *. But if I remove either, it quits working.

Sample URL: http://127.0.0.1:39345/p/docs/REFERENCE.md

erik777 avatar Oct 07 '19 19:10 erik777

Definitely weird, but still allowing just the localhost origin is not that bad.

simov avatar Oct 07 '19 19:10 simov

Just to confirm, the supported wildcards in origins are:

  • *://domain.com
  • *://*.domain.com
  • *://*

Same for localhost. Paths and ports are being ignored and they cannot be wildcarded either. You can only wildcard a protocol/scheme, subdomain immediately after the // and the entire domain part.

simov avatar Mar 18 '23 09:03 simov