Skip to content

Commit 8461ba8

Browse files
Fixed misleading info in README and source file about patterns
1 parent c076ea4 commit 8461ba8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ For the list of allowed origins, you can specify patterns such as:
4848

4949
| pattern | example | description |
5050
|-------------------------------|--------------------------|-------------------------------------------------------------------------|
51-
| domain name alone | mydomain.com | allow any scheme (HTTP or HTTPS) for mydomain.com from ALL source ports |
52-
| generic schema and domain | //mydomain.com | allow any scheme (HTTP or HTTPS) for mydomain.com from ALL source ports |
51+
| domain name alone | mydomain.com | allow any scheme (HTTP or HTTPS) for mydomain.com |
52+
| generic schema and domain | //mydomain.com | allow any scheme (HTTP or HTTPS) for mydomain.com |
5353
| schema and domain name | https://mydomain.com | allow only HTTPS of mydomain.com |
5454
| schema, domain name, and port | http://mydomain.com:8080 | allow only HTTP of mydomain.com from port 8080 |
55-
| dot and domain name | .mydomain.com | allow ALL subdomains of mydomain.com from ALL source ports |
55+
| dot and domain name | .mydomain.com | allow ALL subdomains of mydomain.com |
5656
| dot, domain name, and port | .mydomain.com:443 | allow ALL subdomains of mydomain.com from default HTTPS source port |
5757

5858
## Examples

lib/cors.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ end
7070
-- If the given origin is found within the allowed_origins string, it is returned. Otherwise, nil is returned.
7171
-- origin: The value from the 'origin' request header
7272
-- allowed_origins: Comma-delimited list of allowed origins. (e.g. localhost,https://localhost:8080,//test.com)
73-
-- e.g. localhost : allow http(s)://localhost from ALL source ports
74-
-- e.g. //localhost : allow http(s)://localhost from ALL source ports
73+
-- e.g. localhost : allow http(s)://localhost
74+
-- e.g. //localhost : allow http(s)://localhost
7575
-- e.g. https://mydomain.com : allow only HTTPS of mydomain.com
7676
-- e.g. http://mydomain.com : allow only HTTP of mydomain.com
7777
-- e.g. http://mydomain.com:8080 : allow only HTTP of mydomain.com from port 8080
78-
-- e.g. //mydomain.com : allow only http(s)://mydomain.com from ALL source ports
78+
-- e.g. //mydomain.com : allow only http(s)://mydomain.com
7979
-- e.g. .mydomain.com : allow ALL subdomains of mydomain.com from ALL source ports
8080
-- e.g. .mydomain.com:443 : allow ALL subdomains of mydomain.com from default HTTPS source port
8181
--

0 commit comments

Comments
 (0)