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

Added code snippet to explain how to use splash behind proxy #589

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rava-dosa
Copy link

No description provided.

@codecov-io
Copy link

codecov-io commented Mar 31, 2017

Codecov Report

Merging #589 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #589      +/-   ##
==========================================
+ Coverage    87.7%   87.71%   +<.01%     
==========================================
  Files          42       39       -3     
  Lines        5539     5519      -20     
  Branches      758      758              
==========================================
- Hits         4858     4841      -17     
+ Misses        510      509       -1     
+ Partials      171      169       -2
Impacted Files Coverage Δ
splash/har/utils.py 90.37% <0%> (-3.38%) ⬇️
splash/qtutils.py 78.43% <0%> (ø) ⬆️
splash/__init__.py 100% <0%> (ø) ⬆️
splash/har/__init__.py
splash/kernel/__init__.py
splash/utils.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d78b7a2...0520ade. Read the comment docs.

Copy link
Contributor

@lucywang000 lucywang000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already an example in scripting-ref.rst, so not sure if we need another one in the examples/ folder

@@ -0,0 +1,19 @@
function main(splash)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "use-proxy.lua" would be a better name (the convention in the examples/ folder is to use dash-separated file name, not camel case).

}
end)
local url = splash.args.url
assert(splash:go(url))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't make sense to create a local variable and only use it once. Simply assert(splash:go(splash.args.url)) would do.

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

Successfully merging this pull request may close these issues.

None yet

3 participants