Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit def593c

Browse files
Added a header item Access-Control-Allow-Origin: * for JavaScript Ajax calls.
1 parent 64803ba commit def593c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎ChangeLog.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Change Log
22

3-
### 1.1.0
3+
### 1.1.1 - 2018年10月22日
4+
- Added a header item `Access-Control-Allow-Origin: *` for JavaScript Ajax calls.
5+
6+
### 1.1.0 - 2018年10月21日
47
- Added the `header` query parameter to set additional HTTP header items.
58
- Added the ability to set a random user agent when not given.
69
- Added the `user-agent` query parameter to set a user agent.

‎web/index.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Registry {
1010
const SLUG = 'SimpleWebScraper';
1111
const DESCRIPTION = 'PHP & PhantomJS driven web content scraper';
1212
const PROGRAM_URI = 'https://github.com/michaeluno/php-simple-web-scraper';
13-
const VERSION = '1.1.0';
13+
const VERSION = '1.1.1';
1414
const AUTHOR = 'Michael Uno';
1515
const AUTHOR_URI = 'http://en.michaeluno.jp';
1616

@@ -32,6 +32,9 @@ static public function setUp() {
3232
include( dirname( __FILE__ ) . '/include/class-list.php' )
3333
);
3434

35+
// HTTP Headers
36+
header( 'Access-Control-Allow-Origin: *' );
37+
3538
// Front-end Form
3639
if ( ! isset( $_GET[ 'url' ] ) ) {
3740
include( dirname( __FILE__ ) . '/include/template/form.php' );

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /