Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
litespeed_wiki:config:cors [2017/10/09 14:14]
Lisa Clarke [Start verification]
litespeed_wiki:config:cors [2017/10/09 14:21]
Lisa Clarke [Method 2: Set from config]
Line 20: Line 20:
 ==== Method 2: Set from config==== ==== Method 2: Set from config====
 Navigate to **Web Admin > Configurations > Your Virtual Hosts > Context**: Navigate to **Web Admin > Configurations > Your Virtual Hosts > Context**:
-  - Click **Add** button +  - Click the **Add** button 
-  - Choose ​**Static** type+  - Choose ​''​Static'' ​type
   - Set **URI** to ''/''​ (You can change this if you want to)   - Set **URI** to ''/''​ (You can change this if you want to)
   - Set **Location** to ''​$SERVER_ROOT/​Example/​html/''​ (You can change this if you want to)   - Set **Location** to ''​$SERVER_ROOT/​Example/​html/''​ (You can change this if you want to)
Line 71: Line 71:
 xhr.send(); xhr.send();
 </​code>​ </​code>​
-==== How to support more method ​==== +==== How to support more methods ​==== 
-Default ​CORS support method: PUSH, GET and HEAD. What if want to support ​**OPTIONS** and **DELETE**? \\+By default, ​CORS supports the following methods''​PUSH''​''​GET'' ​and ''​HEAD''​. What if you want to support ​''​OPTIONS'' ​and ''​DELETE'',​ as well? \\
 === Method 1: Set from htaccess file=== === Method 1: Set from htaccess file===
-You can simply append ''​Header always set Access-Control-Allow-Methods:​ <​nowiki>"​GET,​POST,​OPTIONS,​DELETE"</​nowiki>''​ to .htaccess file+You can simply append ''​Header always set Access-Control-Allow-Methods:​ <​nowiki>"​GET,​POST,​OPTIONS,​DELETE"</​nowiki>''​ to the ''​.htaccess'' ​file
  
  
 === Method 2: Set from config=== === Method 2: Set from config===
-You can simply append **Extra Headers** ''​Access-Control-Allow-Methods GET, POST, OPTIONS, DELETE''​. \\ {{:​litespeed_wiki:​config:​cors-7.png?​|}} \\+You can simply append ​to **Extra Headers**''​Access-Control-Allow-Methods GET, POST, OPTIONS, DELETE''​. \\ {{:​litespeed_wiki:​config:​cors-7.png?​|}} \\
  
  
-You can try verification again with sending **DELETE** HTTP method. You will see 200 response. \\ {{:​litespeed_wiki:​config:​cors-8.png?​|}} \\+If you try verification again with the ''​DELETE'' ​HTTP method, you should ​see the 200 response. \\ {{:​litespeed_wiki:​config:​cors-8.png?​|}} \\
  
 ===== More Information ===== ===== More Information =====
  • Admin
  • Last modified: 2017/10/09 14:21
  • by Lisa Clarke