We are using sunspot-rails to connect to websolr on Heroku. Websolr provides an authorization feature to protect read and update calls. This authorization feature requires three additional http headers to be present in every call to SOLR. I am trying to find out a way to add these http headers to every call going from sunspot. The following article shows how to do it for rsolr but not sunspot - https://github.com/onemorecloud/websolr-demo-advanced-auth. The official heroku doc at https://devcenter.heroku.com/articles/websolr has very little info about authorization. Is there a way to alter http headers through sunspot?
sunspot heroku websolr authorization
332 Views Asked by anishdeena At
2
There are 2 best solutions below
0
alf
On
I had to adapt @polmiro's gist a little bit to make it work: https://gist.github.com/alfonsocora/e1f979621bbfe98e10dc
Related Questions in HEROKU
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Using Amazon KMS service on Heroku
- How to have Heroku build my development branch on a staging server?
- Heroku not fetching from DB when scheduler running
- Search for a key in django.core.cache
- Ruby app fails in https request on heroku.com
- Rails: NameError: uninitialized constant Rails::Application::YAML
- clojure worker-only app on heroku fails with Error R10
- Clockwork not logging to Heroku console
- Javascript working in development locally but not production on Heroku
- Heroku PostgreSQL Studio not finding databases
- Heroku : Username for 'https://git.heroku.com': git
- Pg backups curl latest dump from Heroku
- How do you deploy build artifacts to Heroku from Codeship?
- Custom validation message (in model file) that includes a path not working
Related Questions in SUNSPOT
- Query always the same with Sunspot/Solr on rails
- Sunspot gem return all result
- Rails4 + sunspot search
- How to do an OR query with rails sunspot for rsolr
- Solr search from beginning of string
- solr sunspot fulltext search based on boolean field
- solr - sunspot: Error when reindexing (Errno::ECONNREFUSED: Connection refused)
- Get summary information for Sunspot search paginated collection
- Apache Solr - Error Creating SolrCore
- How to fetch only selected column in solr rails
- rails cancan sunspot search not working
- sunspot search on a has many association
- Select integer parameter and Sunspot gem
- Exception thrown starting SOLR in Sunspot gem
- Sunspot Solr Reindex Fails
Related Questions in WEBSOLR
- What's the simplest way to process lots of updates to Solr in batches?
- Geospatial searches with Solr (websolr) in Rails 3.x
- Configuring WebSolr on Heroku
- Sunspot unicode search working locally but not in production
- Where is the websolr log files stored (when using Heroku)?
- How to quickly transfer data between servers using Sunspot / Websolr?
- Near realtime updating of Solr/Sunspot index issue on Websolr/Heroku
- 413 Request is larger than 20 MB or headers are too large. websolr
- Expanding Solr search: "volcano" to match "volcanic"
- How can I reference the distance with the Solr Spatial Search in Sunspot?
- Can't stop solr server on Heroku
- Websolr + Heroku + sunspot_autocomplete with db:seed
- Same database, different Solr indexes
- RSolr::Error::Http (RSolr::Error::Http - 429
- Solr Search with wrong spell
Related Questions in RSOLR
- How to upload a file with rsolr?
- which is better gem for solr cloud setup in rails 4.1 application for aws hosting,I had researched some gems as below
- Why Solr match data and count mismatch while using group.limit?
- Ruby 2.3.1 how to set the project root directory in config.rb
- rsolr not returning facet fields
- SSL Support for sunspot (solr) requests
- How to soft-commit in Sunspot (Solr 4)?
- Using Ruby variable in Rsolr requests
- "Sunspot" Gem makes distinction between UTF-8 chars
- solr newly added documents on indexes not reflected before restart
- Rsolr::Ext return undefined method `to_i' for ["10", "10"]:Array
- When should I create Solr connection in a Rails app
- Query solr cluster for state of nodes
- sunspot heroku websolr authorization
- Fetch top terms with sunspot
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can customize the connection class used in the Sunspot session. You have see an example in this gist: https://gist.github.com/nz/6243059